From: David B. <da...@sl...> - 2002-04-19 10:45:16
|
On Thursday 18 Apr 2002 8:42 pm, Bernhard Herzog wrote: > David Boddie <da...@sl...> writes: > > I may have broken gradient fills in my copy. > > What exactly is wrong? There may well be a bug that for some reason > doesn't show on my system. When I apply a gradient fill, the object becomes unfilled. Maybe I should check out a clean copy of the CVS tree and try that. > > I did glance at the PDF specification, but didn't notice anything which > > mentioned the method used for transparency. There was something about > > using a key colour for transparent pixels, but it wasn't really relevant. > > It's in the PDF 1.4 spec, chapter 7. Earlier versions didn't have > transparency. I'll take a look. I've reimplemented translucency using alpha values which are stored separately to the image. I created an SKAlphaObject like the SKColorObject already present, but I'm wondering whether I can just use a float instead. My main worries are to do with extending the various fills in Sketch/Graphics/pattern.py to use alpha blending. I have changed the __init__ method of SolidPattern, for example, to def __init__(self, color = None, duplicate = None, alpha = None): and introduced an skeloader.py filter which calls SolidPattern with the named alpha parameter where appropriate. This works with the HatchingPattern, too. Is it a good idea to add named parameters to these methods? David ________________________________________________________________________ This email has been scanned for all viruses by the MessageLabs SkyScan service. For more information on a proactive anti-virus service working around the clock, around the globe, visit http://www.messagelabs.com ________________________________________________________________________ |