Gregory Lypny wrote/ schreef:

> Hi Everyone,
> 
> Can I set the icon of a button to a graphics object which I've
> created with MetaCard's draw tools?  That is, this is an object of type
> "graphic" and not of type "image".  I've noticed that the statement
> 
> Set the icon of button "X" to graphic "Y"
> 
> does nothing.
It is not possible to directly use a graphic as image icon, but there is a
work around.

For setting the icon to an image use:
  set the icon of button "MyButton" to "45"
  -- in which "45" is the ID of the image object containing the icon

For setting the icon to an graphic use:
  import snapshot from rect (the rect of graphic "MyGraphic") of window (the
windowID of this stack)
  -- a snapshot is taken from the graphic, which is imported as image
  -- so make sure that nothing overlaps the graphic

  -- assuming that there are no other images on this card
  -- (so that the number of the image will be "1"):
  set the icon of "MyButton" to the ID of image 1

> I'm a beginner (obviously) in the graphics-in-MetaCard arena.  I've
> imported a number of graphics created in Adobe Illustrator, but I'm not
> getting the quality I'd like to have.  For example, I've imported
> graphics as JPEG, which were created at a "high" quality setting and a
> resolution equal to the screen depth.  These appear in MetaCard as nice
> crisp images, but they are bounded by a white rectangle, which is a
> problem on non-white backgrounds.  If I use MetaCard's colour tools and
> set the image's ink to transparent, the white rectangle is largely
> removed but some annoying white pixels remain on the perimeter of the
> image.
> 
> Is there a best format for imported images?
Well, I always use GIF, because that supports transparency and is cross-
platform (unlike BMP or PICT). Also PNG is possible.

> Regards,
> 
> Greg
Hope this helps,
Sjoerd


Archives: http://www.mail-archive.com/metacard@lists.runrev.com/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to