Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: How to achieve transparent graphic in CC? Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 22 2009 at 19:33 | IP Logged Quote GadgetGuy

In my Control Center I have implemented dimmer settings for my dimable lights. To keep the interface simple I only present a single dimmer control which then applys to the currently selected light (which is the last CC lite button pressed).




This last button is indicated by a blue ring around the lighting button (the DWN SOFA button in the above image).

This is done using a standard PH button placed behind, and masked by, the lighting control button so that it appears as just a "ring".

When the current active light is changed I then replace the blue ring background button with a null (transparent) GIF, but I get a square box around the edges of the null image.


{The PLNT; PICT; FIRE; ROOM; ect buttons}.

This "ring" is defined in the CC as a Static Graphic with no image assignments. When a new lighting button is pressed (becomes active) I use ph_setccobjgraphic() to put the blue button behind the new active lighting button, and when a new active button is selected, I again use ph_setccobjgraphic() with the null GIF to clear the "ring". But as seen, I get an unwanted artifact of the GIF square outline.

Is there a way to clear the background (blue ring) image and not get the border outline? I tried just "" in the graphic parameter of the setccobjgraphic funtion
Code:
ph_setccobjgraphic("STATUS","[LOCAL2]","","")

but got the same reults.
Thanks.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 
GadgetGuy
Super User
Super User
Avatar

Joined: June 01 2008
Location: United States
Online Status: Offline
Posts: 942
Posted: January 23 2009 at 07:46 | IP Logged Quote GadgetGuy

Solved it (at least one way). Not perfect but it works. For reference purposes in the forum, here is what I found.

A transparent null (totally empty) GIF used in the CC window seems to leave an shadow box outline artifact when displayed in browsers. It works fine in the CC on the computer but does not export to the web without the shadow problem.

Noting that the existing CC button images don't have this problem I deduced that perhaps a totally empty GIF doesn't work well, so took one of the standard CC button graphics from the ph Graphics folder, opened it in Photoshop and Transformed the picture to about half its prior size, leaving the overall image pixel dimensions as they were. Thus the image was the same size as before but the picture contained therein was greatly reduced in size.

Since this intended placeholder graphic (modified by a trigger macro later to show a ring outline around a button, or not,) was placed behind everything it didn't matter if there was some image content, it doesn't show as long as it is smaller than the graphics on top of it.

This approach works fine and produces no shadow box artifacts.

I consider this a work-around until, or unless, a way is shown to replace an image with an empty image using ph_setccobjgraphic() or something else.

__________________
Ken B - Live every day like it's your last. Eventually, you'll get it right!
Back to Top View GadgetGuy's Profile Search for other posts by GadgetGuy
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum