[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

Re: [XaraXtreme-dev] Re: Filter IDs (was Re: FW: [Bug 1294] New: Problems with "save as" in version 1475)

I think implementing the new bitmap export preview dialog should also
include a general tidy up of the bitmap side of the filter system.  This
would involve moving more of the export options into the base class so
they can be preserved when the filter is changed (e.g. all options that
are valid for more than one filter should be in the base class) and
allowing a filter to add its own filetype specific options to a derived
options class and to add UI for modifying them to the export preview

Yep that would make sense. The PNG filter (and thus the ImageMagick
filter) tries extremely hard to make sure it is recorded opaquely!

Another possible change is that each filter is currently entirely
responsible for storing its own preferences. It is non-obvious
how to do this in a base-class given the preferences system is
sort of designed to work with statics. For ImageMagick I implemented
a hash which is initialized the first time the preferences
are instantiated at the parent-class level, which each of the
(insert large number) of child classes looks at. It then correctly
does the DeclarePref stuff on each one. This could reasonably easily
be entended to hold a pointer to some preference object (rather than
a UINT32) in the hash, and thus remove all the preference from
the bitmap filters entirely.