×

Discussion Board

Results 1 to 1 of 1

Thread: svg mask

  1. #1
    Regular Contributor
    Join Date
    Mar 2008
    Posts
    57

    svg mask

    Hi

    Anybody with an idea on how to get the mask for blitting an svg icon? It's supposed to be antialiased, so the mask can't be 1-bit like in the automask function. I'm using Image.from_icon to load the icon, but the Image object doesn't seem to provide the masks of transparent objects (be it icons, png files...).

    EDIT: Here's what I came up with myself: load the icon to a big bitmap (a few times bigger than the size at which it will be used), convert it to a 1-bit image, scale it down (with antialiasing) to the target icon size, and save as an 8-bit mask. Then scale the original icon to the target size and blit to the canvas using that mask.

    The only problem now (with the theory) is that the pixels on the edge of the icon will be shifted towards white (as they get melted to the white background when scaled). I'm gonna try that tommorow to see if it's viewable (or maybe even has some interesting glowing effect).
    Last edited by nokia_e70; 2008-03-29 at 21:06.

Similar Threads

  1. svg icon mask
    By s4028469 in forum Symbian Media (Closed)
    Replies: 16
    Last Post: 2007-09-26, 03:55
  2. TinyLine SVG Player and SDK 1.8.2 released.
    By girow in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-03-10, 07:31
  3. TinyLine SVG Player and SDK 1.8.2 released.
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2005-03-10, 07:30
  4. TinyLine SVG Minute Toolkit: Optimizing SVG for J2ME
    By girow in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-05-05, 18:44
  5. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×