History log of /haiku/src/libs/icon/transformer/StrokeTransformer.cpp
Revision Date Author Comments
# 0822ec27 17-Oct-2023 PulkoMandy <pulkomandy@pulkomandy.tk>

libicon: Fix dangling references to VertexSource in PathTransformer

PathTransformer keeps a reference to the VertexSource used (which can be
either another PathTransformer, or the base path for a shape). When a
shape is cloned, this should be retargetted to the new object in the
clone.

However, references are not settable, and so, what would happen instead
is the original (non-cloned) vertex source was reinitialized (through
the default implementation of the assignment operator) using data from
the clone, and the clone would still point to it. Then, if the original
object is deleted, the clone would point to freed memory.

To avoid this problem, replace the reference with a pointer (which can
be set to point elsewhere, as the code intended to do). To make sure
this does not happen again, make the VertexSource copy constructor and
assignment operator private, and deleted when the compiler supports
that.

Fixes #18577

Change-Id: I8870d9471c5064e922a84eff8447cbda783b13e6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7052
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Zardshard <0azrune6@zard.anonaddy.com>


# c6c2c042 08-Aug-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Add perspective transformations

As part of adding perspective transformations, agg_trans_perspective.h
was patched to fix a multiple definitions error. This change has been
submitted for review to the "upstream" repositories at [1], [2],
and [3].

Also includes various other improvements such as VertexSource being
split into its own file, code style improvements, and documentation
improvements.

[1] https://sourceforge.net/p/agg/patches/6/
[2] https://github.com/ghaerr/agg-2.6/pull/9
[3] https://github.com/aggeom/agg-2.6/pull/7

Change-Id: I4bffd2f87354bde10155e23145a232a925be6ff3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6801
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 25dc253d 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b8d44bf 18-May-2009 Michael Lotz <mmlr@mlotz.ch>

Enable just enough of the message based format used in Icon-O-Matic to allow
BIconUtils to understand and render it. This makes it possible to use the
HVIFTranslator to also read Icon-O-Matic files out of the box. Will cleanup
now duplicated files next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30794 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12a257d7 09-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* make sure that the ApproximationScale() implementation of any Transformer
not negative
* PathSource can now remember a global scale, and the IconRenderer sets
it, since this value is used in the curve converter for on the fly
generation of vertices, this change does not affect anything and doesn't
create the need to "update" the conversion pipeline to render an icon at
different sizes (like Icon-O-Matic does)

-> this change fixes edgy curves on icons rendered bigger than 64x64 as
reported by Axel some time ago


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23093 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 325a6253 02-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Put the remaining libicon.a classes into the BPrivate::Icon namespace.
* Minor cleanup (like removing the extra blank line between the copyright and the
header guard).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20507 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f953b71 13-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* min/max visibility scale is now between 0 and 4
* flat icon format optimizes for grays in styles


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb07ece0 04-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* moved all the classes actually needed for reading a
vector icon to this place, #ifdef'd out all the editing
features (listening, referencing, converting to
PropertyObject... etc)
* TODO: put into BPrivate namespace...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18396 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 25dc253d6ab28ce204fa4de2d3e7a27d167fc817 22-Nov-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

* Merged weak-symbols branch.
* Fixed trivial merge conflict in src/system/libroot/posix/locale/nl_langinfo.cpp
* Fixed gcc 2 compilation of src/system/glue/init_term_dyn.c.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b8d44bfccf4d07e51069e68eeef1c0b711cb0ef 18-May-2009 Michael Lotz <mmlr@mlotz.ch>

Enable just enough of the message based format used in Icon-O-Matic to allow
BIconUtils to understand and render it. This makes it possible to use the
HVIFTranslator to also read Icon-O-Matic files out of the box. Will cleanup
now duplicated files next.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30794 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 12a257d7f8da26b16637f34a73f8135e6da4d983 09-Dec-2007 Stephan Aßmus <superstippi@gmx.de>

* make sure that the ApproximationScale() implementation of any Transformer
not negative
* PathSource can now remember a global scale, and the IconRenderer sets
it, since this value is used in the curve converter for on the fly
generation of vertices, this change does not affect anything and doesn't
create the need to "update" the conversion pipeline to render an icon at
different sizes (like Icon-O-Matic does)

-> this change fixes edgy curves on icons rendered bigger than 64x64 as
reported by Axel some time ago


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23093 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 325a6253ceb7c4162df2805f7aabc2a119c93534 02-Apr-2007 Axel Dörfler <axeld@pinc-software.de>

* Put the remaining libicon.a classes into the BPrivate::Icon namespace.
* Minor cleanup (like removing the extra blank line between the copyright and the
header guard).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20507 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2f953b71af24542ddd2f510ec45dec7f7e9cdace 13-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* min/max visibility scale is now between 0 and 4
* flat icon format optimizes for grays in styles


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fb07ece069b8b7ca52eda06449ce2f0460b294ab 04-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* moved all the classes actually needed for reading a
vector icon to this place, #ifdef'd out all the editing
features (listening, referencing, converting to
PropertyObject... etc)
* TODO: put into BPrivate namespace...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18396 a95241bf-73f2-0310-859d-f6bbb57e9c96