Open florence opened 4 years ago
pin-line
or pin-arrow-line
.Here's a little shopping bag that uses pin-line
:
#lang racket
(require pict)
(define w 100)
(define h 160)
(define line-width 5)
(define line-color "brown")
(define turn (* 2 pi))
(define bag
(filled-rectangle (* w 3/4) (* h 1/2) #:color "chocolate" #:border-color line-color #:border-width line-width))
(define handle-anchor
(blank (* w 1/2) 0))
(pin-line
(cc-superimpose
(filled-rectangle w h #:color "white" #:draw-border? #f)
(vc-append handle-anchor bag))
handle-anchor lt-find
handle-anchor rt-find
#:start-angle (* 24/100 turn)
#:end-angle (* 74/100 turn)
#:start-pull 1/2
#:end-pull 1/2
#:line-width line-width
#:color line-color)
Facilities like
dc
and 2htdp/image beingpict-convertible?
are currently hard to discover.@rfindler suggested that it seems like a good idea to add in a guide like overview of pict, which i imagine mentioning:
Combinator like image drawing Baselines, text, and pict-last and how to use them pict/convert and its implementations in the main distro Using pict with scribble
Ill try to add this soon, and would love suggestion as to what else should go in this guide!