From jcm at FreeBSD-uk.eu.org Wed Feb 1 22:44:27 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Wed, 1 Feb 2006 22:44:27 +0000 Subject: [cl-pdf-devel] Subclassing charts Message-ID: <20060201224427.GA9497@dogma.freebsd-uk.eu.org> Suppose I want to subclass a chart, and set some defaults for some slots. That seems easy: (defmethod initialize-instance :after ((chart )) (setf (slot-value chart 'pdf:title) "My title")) Fine, no problem. But what if the slot I want to set is in something not yet created, like the legend or axis objects? How can I force the keyword parameters for the internal objects not yet created to be certain default values? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From marc.battyani at fractalconcept.com Wed Feb 1 23:11:57 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Thu, 2 Feb 2006 00:11:57 +0100 Subject: [cl-pdf-devel] Subclassing charts References: <20060201224427.GA9497@dogma.freebsd-uk.eu.org> Message-ID: <05ec01c62784$e67c7400$0a02a8c0@marcxp> "Jonathon McKitrick" wrote: > > Suppose I want to subclass a chart, and set some defaults for some slots. > That seems easy: > > (defmethod initialize-instance :after ((chart )) > (setf (slot-value chart 'pdf:title) "My title")) > > Fine, no problem. But what if the slot I want to set is in something not yet > created, like the legend or axis objects? How can I force the keyword > parameters for the internal objects not yet created to be certain default > values? All the after methods are called in most-specific-last order. So the :after method of your subclass is called after the predefined one and the axis objects will be already created. This is why there are x-axis-options and y-axis-options in charts so that you can pass specific values for the make-instance of the axis. What is lacking is the ability to pass the class name to use for these axis but it's rather easy to add. Marc From jcm at FreeBSD-uk.eu.org Wed Feb 1 23:15:57 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Wed, 1 Feb 2006 23:15:57 +0000 Subject: [cl-pdf-devel] Subclassing charts In-Reply-To: <05ec01c62784$e67c7400$0a02a8c0@marcxp> References: <20060201224427.GA9497@dogma.freebsd-uk.eu.org> <05ec01c62784$e67c7400$0a02a8c0@marcxp> Message-ID: <20060201231557.GB9497@dogma.freebsd-uk.eu.org> On Thu, Feb 02, 2006 at 12:11:57AM +0100, Marc Battyani wrote: : All the after methods are called in most-specific-last order. So the :after method of your : subclass is called after the predefined one and the axis objects will be already created. : : This is why there are x-axis-options and y-axis-options in charts so that you can pass : specific values for the make-instance of the axis. What is lacking is the ability to pass : the class name to use for these axis but it's rather easy to add. How can I force certain values into keyword parameters in the :before method? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From jcm at FreeBSD-uk.eu.org Fri Feb 3 03:07:15 2006 From: jcm at FreeBSD-uk.eu.org (Jonathon McKitrick) Date: Fri, 3 Feb 2006 03:07:15 +0000 Subject: [cl-pdf-devel] Plotting rotated text in chart axis Message-ID: <20060203030715.GA24762@dogma.freebsd-uk.eu.org> I'm trying to modify draw-object specialized on horizontal-value-axis. Oddly enough, there is no problem calling draw-centered, left, or right-text. But when I try set-text-matrix, so that I can plot text on an angle, I have problems. It actually does work, but Adobe on IE and Windows complains that 'Tm' is illegal where it is in the path, or wherever it thinks it is. Any idea how I can get text to render at a 45 degree angle, rather than horizontally here? -Jonathon -- "I am sure that Jesus would use a command prompt. Hello? Ten Commandments??" From ml13 at onlinehome.de Sat Feb 4 17:31:53 2006 From: ml13 at onlinehome.de (Kilian Sprotte) Date: Sat, 4 Feb 2006 18:31:53 +0100 Subject: [cl-pdf-devel] embedding eps Message-ID: Hey, sorry, if this is a stupid question, but is it actually possible to embed an eps file? I mean to have a graphic somewhere, coming from an eps file without having to convert it to jpeg before. Thanks, -Kilian From marc.battyani at fractalconcept.com Sun Feb 5 17:56:45 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 5 Feb 2006 18:56:45 +0100 Subject: [cl-pdf-devel] embedding eps References: Message-ID: <012301c62a7d$9a9718f0$441af8c1@marcxp> "Kilian Sprotte" wrote: > sorry, if this is a stupid question, but is it actually possible to > embed an eps file? > I mean to have a graphic somewhere, coming from an eps file without > having to convert it to jpeg before. I can't look at this right now (I'm on ski vacation with modem only net access) but maybe it's possible as an XObject. At least if you find an eps to pdf translator, then for sure you can embed the resulting pdf where you want on the page. Marc From marc.battyani at fractalconcept.com Sun Feb 5 17:59:19 2006 From: marc.battyani at fractalconcept.com (Marc Battyani) Date: Sun, 5 Feb 2006 18:59:19 +0100 Subject: [cl-pdf-devel] Plotting rotated text in chart axis References: <20060203030715.GA24762@dogma.freebsd-uk.eu.org> Message-ID: <015301c62a7f$62c35720$441af8c1@marcxp> "Jonathon McKitrick" wrote: > > I'm trying to modify draw-object specialized on horizontal-value-axis. > > Oddly enough, there is no problem calling draw-centered, left, or right-text. > But when I try set-text-matrix, so that I can plot text on an angle, I have > problems. It actually does work, but Adobe on IE and Windows complains that > 'Tm' is illegal where it is in the path, or wherever it thinks it is. > > Any idea how I can get text to render at a 45 degree angle, rather than > horizontally here? Something like with-saved-context, translate x y, rotate 45 then draw text should work IMO. Marc