diff --git a/pitfall/pitfall/vector.rkt b/pitfall/pitfall/vector.rkt index 5a2e5999..c418d750 100644 --- a/pitfall/pitfall/vector.rkt +++ b/pitfall/pitfall/vector.rkt @@ -30,6 +30,7 @@ stroke fillAndStroke clip + shear transform translate scale))) @@ -216,13 +217,18 @@ (send this addContent (string-append "W" (_windingRule rule) " n"))) -(define/contract (transform this m11 m12 m21 m22 mdx mdy) +(define/contract (transform this scaleX shearY shearX scaleY mdx mdy) (number? number? number? number? number? number? . ->m . object?) - (define new-ctm (list m11 m12 m21 m22 mdx mdy)) + (define new-ctm (list scaleX shearY shearX scaleY mdx mdy)) (set-field! _ctm this (combine-transforms (ยท this _ctm) new-ctm)) (send this addContent (make-transform-string new-ctm))) +(define/contract (shear this x y) + (number? number? . ->m . object?) + (transform this 1 y x 1 0 0)) + + (define/contract (translate this x y) (number? number? . ->m . object?) (transform this 1 0 0 1 x y))