History log of /haiku/src/libs/icon/shape/Shape.cpp
Revision Date Author Comments
# 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>


# c5abd6a7 18-Jul-2023 Zardshard <0azrune6@zard.anonaddy.com>

libicon: Notify Shape on transformer addition/removal

hrev57144 accidentally made Shape be notified only if the library was
compiled for Icon-O-Matic.
Also includes some miscellanious improvements.

Fixes #18510

Change-Id: Ie4ae7f9b8b1a5b39f87db2dbf79064fa875b644c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6705
Reviewed-by: waddlesplash <waddlesplash@gmail.com>


# 64279352 22-Jun-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Generalize some classes

* Turns PathContainer, ShapeContainer, StyleContainer into Container.
* Makes Shape use Container for storing Tansformers instead of
reinventing the wheel yet again.
* Moves common logic from AddPathsCommand, AddStylesCommand,
AddShapesCommand, and AddTransformersCommand to AddCommand.
* Factors out common logic from two more commands similar to above.
This adds the MoveCommand and RemoveCommand classes.
* Cleans up some code style.

Change-Id: I59eca94a1c45eac608514f269f6e5f8628f93fab
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6640
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 098eaec6 08-Jun-2023 Zardshard <0azrune6@zard.anonaddy.com>

Icon-O-Matic: Add reference images

Fixes #2748

Also fixes a comment misstating a function's name and code style.

Change-Id: I609a1f1e100ded647818e70b428cedc48cf29036
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6604
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>


# 0cbb6c11 09-May-2015 Stephan Aßmus <superstippi@gmx.de>

Icon-O-Matic: Make GradientTransformable a BReferenceable

* Switch to using support/Referenceable.h instead of using an older copy
of this code.
* Make GradientTransformable a BReferenceable and fix #12033.


# 27dd2109 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Disabled the display of the "Rounding" (a.k.a. Hinting) property for the time
being. The implementation isn't currently finished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31810 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


# 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


# 014c7e94 07-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* Transformable::Reset() + Invert() didn't notify
* Path and StyleContainer take an index in Add...()
* FlatIconImporter works when "appending" another icon


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


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

* fixed build for PathContainer.cpp (stupid last minute change...)
* fixed crashing bug in Shape, it doesn't "own" the Style...
* fixed problem in Shape in for non Icon-O-Matic build, fNeedsUpdate
still needs to be maintained.

Having a read-only version has definitely improved efficiency! The
icon import time must have dropped 50%. The overall penalty for
reading vector icons in Tracker seems to be 1.5 to 2 ms now, including
parsing and rendering at 32x32.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18398 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


# 0cbb6c11eec74201f566920c90ebd2c5546b7aa6 09-May-2015 Stephan Aßmus <superstippi@gmx.de>

Icon-O-Matic: Make GradientTransformable a BReferenceable

* Switch to using support/Referenceable.h instead of using an older copy
of this code.
* Make GradientTransformable a BReferenceable and fix #12033.


# 27dd21091a6d7215adc0c649426e4c21483545d0 27-Jul-2009 Stephan Aßmus <superstippi@gmx.de>

Disabled the display of the "Rounding" (a.k.a. Hinting) property for the time
being. The implementation isn't currently finished.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31810 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


# 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


# 014c7e945947976817a8b14d4b4f89563f769f1a 07-Aug-2006 Stephan Aßmus <superstippi@gmx.de>

* Transformable::Reset() + Invert() didn't notify
* Path and StyleContainer take an index in Add...()
* FlatIconImporter works when "appending" another icon


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


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

* fixed build for PathContainer.cpp (stupid last minute change...)
* fixed crashing bug in Shape, it doesn't "own" the Style...
* fixed problem in Shape in for non Icon-O-Matic build, fNeedsUpdate
still needs to be maintained.

Having a read-only version has definitely improved efficiency! The
icon import time must have dropped 50%. The overall penalty for
reading vector icons in Tracker seems to be 1.5 to 2 ms now, including
parsing and rendering at 32x32.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18398 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