Transparent Images

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Transparent Images

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:47 pm

by Jade Dude >> Mon, 27 Oct 2003 21:51:26 GMT

How do i make transparent images that will work in jade?

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Transparent Images

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:47 pm

by allistar >> Tue, 28 Oct 2003 7:32:36 GMT

You can set the transparencyColor of a Picture control to the colour you want to make transparent. Im am unsure whether JADE fully supports the alpha channel in png files.

Regards,
Allistar.
--
------------------------------------------------------------------
Allistar Melville
Software Developer, Analyst allistar@silvermoon.co.nz
Auckland, NEW ZEALAND

Silvermoon Software
Specialising in JADE development and consulting
Visit us at: http://www.silvermoon.co.nz
*NEW* Simple web access to Jade at: www.silvermoon.co.nz/jhp.html ------------------------------------------------------------------

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Transparent Images

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:47 pm

by Jade Dude >> Tue, 28 Oct 2003 22:48:07 GMT

Is there a way to make a image on a jademask transparent?

I've made a toolbar with flat images using a jademask, the only problem is that the background colour of the buttons are fixed and it looks weird when the user is using a different colour scheme (or running a different version of windows).

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Transparent Images

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:47 pm

by Patwos >> Thu, 30 Oct 2003 2:23:35 GMT

Here's 2 alternate options:

1) Try making the image you're using an .ico file rather than a .png or ..bmp and set the areas of your icon transparent where appropriate and then the areas of your icon that are transparent will show the appropriate backColor for that JadeMask control.

2) Set the transparentColor for your JadeMask control to an appropriate colour that you use for flood fill on all your images for a given JadeMask control. You need to make sure that the colour you choose does not conflict with a colour already in use on any of the images your are using for a given JadeMask control.

As this property is not visible as a design time property on the JadeMask control, you either need to set it programmatically or you need to subclass the JadeMask control and make the transparentColor property visible as a design time property on your subclass.

I'm not sure why the JadeMask control doesn't have transparentColor as a visible design time property as nothing seems to break when you use this either programatically or by way of a subclassed control?

Hope that helps,
Pat.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 9 guests

cron