Commit Graph

66 Commits

Author SHA1 Message Date
Stephan Aßmus
b763084c19 Axel forgot to adopt this very central place to the new B_VECTOR_ICON_TYPE
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19227 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-08 04:48:41 +00:00
Stephan Aßmus
6e3b3b09d3 * improvements to saving/loading, biggest flaw was that appending an icon
changed the save entry_ref to the appended file, instead of keeping it
* added cleaning up styles (removing duplicates) after importing from SVG
* compile fixes for rgb_color ==/!= rgb_color
* added Style::operator==(const Style& other)
* improved debug output when listeners are still attached
  to a VectorPath upon destruction



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19188 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-11-03 09:40:22 +00:00
Marcus Overhagen
3ec18e87d6 various GCC 4 build fixes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-17 15:08:41 +00:00
Stephan Aßmus
59deaf10bc various changes to improve integration of vector icons
* Deskbar uses 32 bit icons now
* vector icons are now correctly converted to B_CMAP8 bitmaps
  if no B_CMAP8 icon is available
* small fixes in Tracker (window mode menu)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18803 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-09-11 10:52:01 +00:00
Stephan Aßmus
7fb6186f3c * integration of vector icons with the registrar and the mime data base
* additional versions of SetIcon[ForType] and GetIcon[ForType] in BMimeType
  and BAppFileInfo, which handle flat vector icon data
* changes in Tracker to support scalable icons (currently broken for
non-vector icons and needs cleanup) and drawing icons correctly with alpha
channel (large parts of this work done by Michael Lotz)

If someone feels like looking over the changes, that would be much
appreciated! :-)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18699 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-29 17:06:23 +00:00
Stephan Aßmus
5fc2ff880a work in progress to integrate vector icons with BNodeInfo,
BMimeType and Tracker in general, nothing should have changed
visually, Tracker is now using 32 bpp icons though

I hope I have not broken anything...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18632 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-26 13:51:51 +00:00
Stephan Aßmus
8ae0d03ade * Icon inherits from Referenceable in Icon-O-Matic mode
* new listeners receive an AreaInvalidated notification


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18564 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-22 13:33:27 +00:00
Stephan Aßmus
2d8b47105a * a VectorPath can transform all it's points using a given
Transformable, should have been part of the last commit...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18556 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-21 18:19:16 +00:00
Stephan Aßmus
86133f5e63 * (temporarily) added libexpat, built as static lib, removed all
clutter, straight from the sources of release 1.95.8, configured
  to obtain expat_config.h, seems to work fine


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18552 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-21 17:24:26 +00:00
Stephan Aßmus
2f953b71af * 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
2006-08-13 16:06:42 +00:00
Stephan Aßmus
014c7e9459 * 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
2006-08-07 20:47:20 +00:00
Stephan Aßmus
4122cbb09a * copied code from BNodeInfo over to BIconUtils
* implemented a simple "GetIcon" function which loads whatever
  icon fits most depending on the available icons and the
  colorspace/size of the pre-allocated bitmap passed to the function


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18404 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-05 16:06:09 +00:00
Stephan Aßmus
6b422a8c22 * added a little documentation to BIconUtils in the header
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18401 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-05 13:53:54 +00:00
Stephan Aßmus
70f4b8c0ae * cleanup for consistency in FlatIconFormat.h
* used Axels proposals for vector icon attribute name
* added a BIconUtils class, currently only dealing with vector icons,
  it will render a vector icon from either a BNode attribute or a flat
  buffer in memory into a provided bitmap. The bitmap needs to be of
  B_RGBA32 colorspace, the size of the bitmap determines the scaling
  of the vector icon, width and height should currently be the same
  (square bitmap)
* TODO:
  - add reading of "old" BeOS icons / move icon reading from other
    places (BMimeType?) into BIconUtils
  - add reading icons from resources?
  - suggestions?


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18400 a95241bf-73f2-0310-859d-f6bbb57e9c96
2006-08-05 13:12:43 +00:00
Stephan Aßmus
38c71d13d7 * 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
2006-08-05 00:24:12 +00:00
Stephan Aßmus
fb07ece069 * 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
2006-08-04 23:57:01 +00:00