From: Robert Strandh
Subject: More CLIM-spec questions
Date: 
Message-ID: <6whfcawwbc.fsf@serveur3-1.labri.u-bordeaux.fr>
Hello,

I have som more questions concerning the CLIM spec.

The drawing functions (draw-line, draw-polygon, etc) according to
section 12.7.1 merge drawing options into the medium and then call the
equivalent medium-specific functions.  The medium-specific functions
peform transformations on the coordinates and the clipping region and
then call the equivalent port-specific drawing functions

1.  The function draw-polygon has a keyword argument (filled t) that
    indicates whether the polygon should be filled or not.  The
    function port-draw-plygon* has an optional line-style argument
    that, when nil, indicates a filled polygon.  However,
    medium-draw-polygon* does not have an argument that indicates
    whether the polygon should be filled.  Does this mean that the
    line-style in the medium is set to nil before passed to
    medium-draw-polygon*?

2.  The generic function medium-draw-text* has a strange parameter
    list that I don't understand:

    medium text x y (start 0) end (aligh-x :left) (align-y :baseline)
    toward-x toward-y transform-glyphs

    It seems to indicate that certain required arguments have default
    values.  What is that supposed to mean?

3.  Same question as 2 but for port-draw-string* with a similar
    parameter list. 

4.  The port-specific drawing functions all take as optional arguments
    an ink, either a line- or a text-style, and a clipping region.
    Does that mean that the medium-specific functions don't merge the
    transformed clipping region into the medium, but instead pass it
    as the last optional argument?  In that case, what values do they
    supply for the first two optional arguments?

5.  For the medim-specific functions to call the port-specific drawing
    functions, the port argument must be determined from the medium.
    What, then, is the purpose of the port argument, since the medium
    itself is also passed to the port-specific functions?

Thanks in advance,
-- 
Robert Strandh

---------------------------------------------------------------------
Greenspun's Tenth Rule of Programming: any sufficiently complicated C
or Fortran program contains an ad hoc informally-specified bug-ridden
slow implementation of half of Common Lisp.
---------------------------------------------------------------------
From: Mike McDonald
Subject: Re: More CLIM-spec questions
Date: 
Message-ID: <02oR4.603$NX3.12338@typhoon.aracnet.com>
In article <··············@serveur3-1.labri.u-bordeaux.fr>,
	Robert Strandh <·······@labri.u-bordeaux.fr> writes:
> Hello,
> 
> I have som more questions concerning the CLIM spec.
> 
> The drawing functions (draw-line, draw-polygon, etc) according to
> section 12.7.1 merge drawing options into the medium and then call the
> equivalent medium-specific functions.  The medium-specific functions
> peform transformations on the coordinates and the clipping region and
> then call the equivalent port-specific drawing functions
> 
> 1.  The function draw-polygon has a keyword argument (filled t) that
>     indicates whether the polygon should be filled or not.  The
>     function port-draw-plygon* has an optional line-style argument
>     that, when nil, indicates a filled polygon.  However,
>     medium-draw-polygon* does not have an argument that indicates
>     whether the polygon should be filled.  Does this mean that the
>     line-style in the medium is set to nil before passed to
>     medium-draw-polygon*?

  That sounds like a reasonable interpretation. Another is that the filled arg
got left out. The Symbolics/Franz/... version of medium-draw-polygon* has the
filled arg.

> 2.  The generic function medium-draw-text* has a strange parameter
>     list that I don't understand:
> 
>     medium text x y (start 0) end (aligh-x :left) (align-y :baseline)
>     toward-x toward-y transform-glyphs
> 
>     It seems to indicate that certain required arguments have default
>     values.  What is that supposed to mean?

  I took it as a cut&paste error in the original spec.

> 4.  The port-specific drawing functions all take as optional arguments
>     an ink, either a line- or a text-style, and a clipping region.
>     Does that mean that the medium-specific functions don't merge the
>     transformed clipping region into the medium, but instead pass it
>     as the last optional argument?  In that case, what values do they
>     supply for the first two optional arguments?

> 5.  For the medim-specific functions to call the port-specific drawing
>     functions, the port argument must be determined from the medium.
>     What, then, is the purpose of the port argument, since the medium
>     itself is also passed to the port-specific functions?

  Here's one of the places reality differs from the spec. One of the spec's
authors told me that port-draw- functions were basicly to be ignored, that no
"real" CLIM program would call them, and all of the real output was done by
the medium-draw- functions. If you take this point of view, the spec makes a
lot more sense.

  Mike McDonald
  ·······@mikemac.com