Picayune pict documentation details

In 2 Basic Pict Constructors
it says
The arguments to the rendering procedure will be a drawing context and top-left location for drawing.
But it doesn't explain that 'draw' is the rendering procedure.

And it's confusing that in the example of the use of dc, the name 'dc' is also used as a formal parameter of the lambda expression, even though that dc is quite different fro the dc function being documented.

yes, it's true, i remember one of my code, see below, i had problem understanding the concept of 'drawing context', and documented it a few in comments. I think the best way to understand is to copy/paste dumbly (not sure of this adjective i use first time :sweat_smile: i'm french) some racket examples, see the link to the doc in my code and below:

(new my-canvas% [parent frame0]
	   [paint-callback
	    (λ (canvas dc) ;; dc: Drawing Context
	      ;; cf. https://docs.racket-lang.org/draw/overview.html#%28tech._drawing._context%29
	      
	      ;; (send dc draw-rectangle
	      ;; 	    (random 10) 10   ; Top-left at (0, 10), 10 pixels down from top-left
	      ;; 	    30 10) ; 30 pixels wide and 10 pixels high
	      ;; (send dc draw-line
	      ;; 	    (random 10) 0    ; Start at (0, 0), the top-left corner
	      ;; 	    30 30) ; and draw to (30, 30), the bottom-right corner

	      (send dc erase)
	      (send dc set-pen "black" 1 'solid)
	      (draw-axes dc)
	      (draw-units dc)
	      (draw-z-point dc)

	      (if animation-mode
		  (draw-zeta-multi-values dc)
		  (draw-zeta dc))
	      
	      ;; (send dc set-scale 3 3)
	      ;; (send dc set-text-foreground "blue")
	      ;; (send dc draw-text "Don't Panic!" 0 0)
	      )])

the doc i used is here:

The arguments to the rendering procedure will be a drawing context and top-left location for drawing.

But it doesn't explain that 'draw' is the rendering procedure.

Well, draw is a procedure argument to dc :slight_smile: but presumably PRs welcome? https://github.com/racket/pict

And it's confusing that in the example of the use of dc, the name 'dc' is also used as a formal parameter of the lambda expression, even though that dc is quite different fro the dc function being documented.

It is a bit conventional to name function arguments that are drawing contexts dc, but I agree it's confusing in this example (not least because Scribble links it to the procedure documentation). Perhaps dctx or something if brevity is valued?