Hello,
I had no idea this could be done until I saw this post. I just finished implementing translucent polygons for my app, and it's looking great! The approach I used is as follows: -draw the object using dc -if opacity: create gc and draw again with translucent brush. I had to do it like this since I wanted my polygon borders to stay opaque and only the filling to be translucent. I think this general approach would be suitable to include in fc1. The common case (no translucency) is just as fast, and only the objects that actually use the gc will incur the performance hit. Vitor 2010/4/14 Christopher Barker <[email protected]> > Timothy W. Grove wrote: > > Is it possible to fill an object with a translucent fill in fc1 or do I > > need fc2? I think I've seen a post about this somewhere, but can't find > > it at the moment... > > you can do it, but it's a bit kludgy. Here's an wiki page someone wrote > about it: > > http://trac.paulmcnett.com/floatcanvas/wiki/AlphaCircle > > > > I need to place some hit-able objects over top of a background bitmap, > > but I still need to see the bitmap showing through the object fills. > > At the bottom of that page, there is a note about how you have to do a > bit more if you want to hit-test the alpha objects. If you have any > trouble figuring that out, let me know. > > > I should probably build the alpha option into all the standard FC > DrawObjects, though using GCDC everywhere would cause a performance hit, > at least in some cases, on some platforms, and making it conditional > would make for a lot of duplicated code. If anyone has an idea about how > to do it cleanly, let me know! > > -Chris > > > > -- > Christopher Barker, Ph.D. > Oceanographer > > Emergency Response Division > NOAA/NOS/OR&R (206) 526-6959 voice > 7600 Sand Point Way NE (206) 526-6329 fax > Seattle, WA 98115 (206) 526-6317 main reception > > [email protected] > _______________________________________________ > FloatCanvas mailing list > [email protected] > http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas >
_______________________________________________ FloatCanvas mailing list [email protected] http://paulmcnett.com/cgi-bin/mailman/listinfo/floatcanvas
