diff --git a/collects/scribblings/draw/dc-intf.scrbl b/collects/scribblings/draw/dc-intf.scrbl index ed2f035f62..7d7a58527f 100644 --- a/collects/scribblings/draw/dc-intf.scrbl +++ b/collects/scribblings/draw/dc-intf.scrbl @@ -214,13 +214,16 @@ See also @method[dc<%> set-smoothing] for information on the } -@defmethod[(draw-lines [points (listof (is-a?/c point%))] +@defmethod[(draw-lines [points (or/c (listof (is-a?/c point%)) + (listof (cons/c real? real?)))] [xoffset real? 0] [yoffset real? 0]) void?]{ -Draws lines using a list of @scheme[points], adding @scheme[xoffset] - and @scheme[yoffset] to each point. The current pen is used for +Draws lines using a list @scheme[points] of points, adding @scheme[xoffset] + and @scheme[yoffset] to each point. A pair is treated as a point where the + @racket[car] of the pair is the x-value and the @racket[cdr] is the y-value. + The current pen is used for drawing the lines. See also @method[dc<%> set-smoothing] for information on the @@ -274,14 +277,18 @@ Plots a single point using the current pen. } -@defmethod[(draw-polygon [points (listof (is-a?/c point%))] +@defmethod[(draw-polygon [points (or/c (listof (is-a?/c point%)) + (listof (cons/c real? real?)))] [xoffset real? 0] [yoffset real? 0] [fill-style (one-of/c 'odd-even 'winding) 'odd-even]) void?]{ -Draw a filled polygon using a list of @scheme[points], adding - @scheme[xoffset] and @scheme[yoffset] to each point. The polygon is +Draw a filled polygon using a list @scheme[points] of points, adding + @scheme[xoffset] and @scheme[yoffset] to each point. + A pair is treated as a point where the + @racket[car] of the pair is the x-value and the @racket[cdr] is the y-value. + The polygon is automatically closed, so the first and last point can be different. The current pen is used for drawing the outline, and the current brush for filling the shape. diff --git a/collects/scribblings/draw/dc-path-class.scrbl b/collects/scribblings/draw/dc-path-class.scrbl index 653f99e1b3..936c1cfc4d 100644 --- a/collects/scribblings/draw/dc-path-class.scrbl +++ b/collects/scribblings/draw/dc-path-class.scrbl @@ -142,13 +142,16 @@ Extends the path's @tech{open sub-path} with a line to the given } -@defmethod[(lines [points (listof (is-a?/c point%))] +@defmethod[(lines [points (or/c (listof (is-a?/c point%)) + (listof (cons/c real? real?)))] [xoffset real? 0] [yoffset real? 0]) void?]{ Extends the path's @tech{open sub-path} with a sequences of lines to - the given points. If the path has no @tech{open sub-path}, + the given points. A pair is treated as a point where the @racket[car] + of the pair is the x-value and the @racket[cdr] is the y-value. + If the path has no @tech{open sub-path}, @|MismatchExn|. (This convenience method is implemented in terms of @method[dc-path% line-to].) diff --git a/collects/scribblings/draw/region-class.scrbl b/collects/scribblings/draw/region-class.scrbl index fe84ee0099..f0be83c7fa 100644 --- a/collects/scribblings/draw/region-class.scrbl +++ b/collects/scribblings/draw/region-class.scrbl @@ -150,12 +150,16 @@ The fill style affects how well the region reliably combines with } -@defmethod[(set-polygon [points (listof (is-a?/c point%))] +@defmethod[(set-polygon [points (or/c (listof (is-a?/c point%)) + (listof (cons/c real? real?)))] [xoffset real? 0] [yoffset real? 0] [fill-style (one-of/c 'odd-even 'winding) 'odd-even]) void?]{ -Sets the region to the interior of the specified polygon. + +Sets the region to the interior of the polygon specified by + @racket[points]. A pair is treated as a point where the @racket[car] + of the pair is the x-value and the @racket[cdr] is the y-value. See also @xmethod[dc<%> draw-polygon], since the region content is determined the same way as brush-based filling in a @scheme[dc<%>].