Its not often that a completely new algorithm for efficiently rendering anti-aliased polygons and bezier curves comes around the block, but HERE IT IS!!!!!
http://josiahmanson.com/research/wavelet_rasterization/
jules wrote:Wow! Didn't really think there could be any other way to do it.. I don't understand the mathematical squiggles in their paper, but the code looks pretty simple. Sadly they say that it's 3x slower than AGG, so it's probably also slower than my current code, but the quality looks great.
TheVinn wrote:So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!
Andrew J wrote:TheVinn wrote:So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!
It'd be nice if we could swap in the AGG method too.
jules wrote:Andrew J wrote:It'd be nice if we could swap in the AGG method too.
Why!? I'm sure my rasteriser is just as good as the AGG one!
Andrew J wrote:BTW Vinnie - sorry for hijacking your thread!
TheVinn wrote:So on a related note, is the interface to the juce LowLevelSoftwareRenderer sufficient that this wavelet rasterization method could be swapped in programatically, at run time, without changing any Juce library code? If not, it should be!
jules wrote:Well.. The answer's no: the software engine certainly doesn't have a hot-swappable rasteriser! And TBH I don't agree that it should have one!
I designed it to do its job as simply and cleanly as possible, not to make it easy to tinker with. Of course you could write a new LowLevelGraphicsContext to use a different algorithm.
class SoftwareRendererClasses
{
public:
// ...
template <class TypeOfSoftwareRendererClassesToUse = SoftwareRendererClasses>
class SoftwareRendererSavedState
{
public:
SavedState (const Image& image_, const Rectangle<int>& clip_)
: image (image_), clip (new TypeOfSoftwareRendererClassesToUse ::ClipRegion_RectangleList (clip_)),
transform (0, 0),
interpolationQuality (Graphics::mediumResamplingQuality),
transparencyLayerAlpha (1.0f)
{
}
//...
template <class TypeOfSavedStateToUse = SoftwareRendererSavedState>
class JUCE_API LowLevelGraphicsSoftwareRenderer : public LowLevelGraphicsContext
{
//...
protected:
RenderingHelpers::SavedStateStack<TypeOfSavedStateToUse> savedState;
//...
class WaveletSoftwareRendererClasses : public SoftwareRendererClasses
{
public:
template <class PixelType, bool replaceExisting = false>
class SolidColourEdgeTableRenderer
{
// Implement wavelet rendering here
//...
virtual LowLevelGraphicsContext* createGraphicsContext (const Image& imageToRenderOn,
const Point<int>& origin,
const RectangleList& initialClip)
{
return new LowLevelGraphicsSoftwareRenderer <SoftwareRendererSavedState <WaveletSoftwareRendererClasses > > (
imageToRenderOn, origin, initialClip);
}
Return to General JUCE discussion
Users browsing this forum: No registered users and 2 guests