Re: Renderiing filters

>>>>> "SL" == Sigurd Lerstad <sigler@bredband.no> writes:

SL> Thanks for answering, I'm still not sure of what I should do. I'd
SL> like to do it the way most existing implementations are done. That
SL> way, I know my approach is a "safe" method.

    I have no way of knowing exactly what most implementations have
done.  However I suspect that most have processes some filters in user
space and some filters in device space. In Batik the choice between
user and device space varies from transform to transform, and from
parameter set to parameter set.  The only way to give you more
information than this would be the exactly decribe what one
implementation has done.

   On that note I will point out that the source code for Batik is
publicly available (under the Apache licence) and you can use that as
a reference for proceeding.

   Good luck.

SL> I'm wondering what the intended/recommended way (if there is such
SL> a thing) to render elements that have a style="filter:#..." on
SL> them
>>  Correctly :)
>> 
SL> My question is:
>>
SL> Should I process the filters in an untransformed coordinate-system
SL> (I mean, the X axis is horizontal and the Y-axis is vertical) and
SL> then transform the final/resulting image into the other coordinate
SL> system (easier for most filters, especially the gaussianBlur), but
SL> quality will suffer, and makes it harder with
SL> BackgroundGraphic/BackgroundAlpha
>>
SL> OR
>>
SL> Should I process the filters in the correct coordinate system from
SL> the start (might be difficult for some filters), but quality will
SL> be high
>>  For some transforms one way makes sense for some the other makes
>> sense.  I would suggest that if you are doing the filter in an
>> untransformed coordinate system and later transforming that to the
>> device, you should use a fairly high quality implementation of
>> affine transform to do the mapping, you should also take care to
>> scale the untransformed coordinate system properly.

Received on Thursday, 23 August 2001 17:42:46 UTC