[cl-typesetting-devel] Top-level layout, multi-page tables, and other contrib

Marc Battyani marc.battyani at fractalconcept.com
Sun Mar 7 22:52:18 UTC 2004


"Dmitri Ivanov" <divanov at aha.ru> writes:

> |> 3) AFAIR, code badly needs lots of restructuring and encapsulation.
> |> For example, the pdf:page class should inherit from typeset:page,
> | pdf:document -
> |> from typeset:document, not vice versa.
> |
> | No. cl-pdf can be used without cl-typesetting. At least for now ;-)
>
> At least symbols pdf:*document*, pdf:*page* and some others should be
> imported into typeset and then reexported.

Yes.

> I assumed that finalize-page can perform custom operations like adding
> outline via finalize-fn. Perhaps finalize-page should become a generic and
> do this in :before  or :after method for pdf::page argument (as well as
> getting content).

I have not looked enough at this code to have an opinion on this yet. :)

> BTW, I've run into the questionable method in stroke.lisp:
>
> (defmethod stroke ((style text-style) x y)
>   (when (font style)
>     (setf *font* (font style)))
>   (when (font-size style)
>     (setf *font-size* (font-size style)))
>   (when (text-x-scale style)
>     (setf *text-x-scale* (text-x-scale style)))
>   (when (color style)
>     (setf *color* (color style))
>     (pdf::set-color-fill *color*)))
>
> Though *color* holds a foreground, or stroking, color value, this value is
> assigned as a non-stroking PDF color. Must we have the following:
>
> (defmethod stroke ((style text-style) x y)
>   (when (font style)
>     (setf *font* (font style)))
>   (when (font-size style)
>     (setf *font-size* (font-size style)))
>   (when (text-x-scale style)
>     (setf *text-x-scale* (text-x-scale style)))
>   (when (color style)
>     (setf *color* (color style))
>     (pdf::set-color-stroke *color*))
>   (when (background-color style)
>     (setf *background-color* (background-color style))
>     (pdf::set-color-fill *background-color*)))

Not for text. When drawing text in pdf, the fill color is used. IIRC the
stroke color would apply when you want to have hollow characters for
instance.

Marc





More information about the cl-typesetting-devel mailing list