realbasic-nug
[Top] [All Lists]

Re: [ANN] PDF Classes 2.0

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: [ANN] PDF Classes 2.0
From: Phil M <phil at mobleybros dot com>
Date: Wed, 30 Nov 2005 12:55:00 -0800
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BFB28333 dot 5B60%Roph at kc dot rr dot com> <054f3771b6b8e991331d1e1900410907 at fireyesoftware dot com>
On Nov 30, 2005, at 12:36 PM, Asher Dunn wrote:

Abstract the drawing interface to render to screen or PDF based on a
variable?

I would say the easiest way would be to draw to either a Graphics object (screen) or PDFGraphics object (PDF). Unfortunately, you would have to duplicate code to accept either Graphics or PDFGraphics, as I cannot effectively subclass Graphics.

I was planning on doing something like this... basically I was planning to write a GraphicsWrapper Class which manually duplicated all of the public methods of the Graphic class, except instead of accepting Integer values for position, I would take Doubles and also add a scale factor.

I thinking about adding a stack of drawing commands so that if the scale changes the current stack could be redrawn automatically. The only issue I have with a stack are Picture objects since the same Picture object could look entirely different 5 minutes later... which means keeping a copy of every Picture drawn to the stack and that could get memory intensive.

My goal (like so many others in this thread) was to make an API that allowed WYSIWYG drawing that could be rendered to screen or printer always at optimum resolution/position.

Like so many of my other projects, I have spent a lot of time thinking about this but I haven't been able to set down and start coding. It sounds like there is enough of us interested that we might be able to do a collaborative project.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>