diff options
Diffstat (limited to 'Core/drawing/medium.lisp')
-rw-r--r-- | Core/drawing/medium.lisp | 69 |
1 files changed, 38 insertions, 31 deletions
diff --git a/Core/drawing/medium.lisp b/Core/drawing/medium.lisp index 777d4035..cae6c948 100644 --- a/Core/drawing/medium.lisp +++ b/Core/drawing/medium.lisp @@ -78,7 +78,37 @@ gs-line-style-mixin gs-text-style-mixin gs-layout-mixin) - ()) + ((transformation + :type transformation + :initarg :transformation + :initform +identity-transformation+ + :accessor medium-transformation) + (clipping-region + :type region + :initarg :clipping-region + :initform +everywhere+ + :documentation "Clipping region in the SHEET coordinates.") + (ink + :initarg :ink + :initform +foreground-ink+ + :accessor medium-ink) + (line-style + :initarg :line-style + :initform (make-line-style) + :accessor medium-line-style) + (text-style + :initarg :text-style + :initform *default-text-style* + :accessor medium-text-style + :type text-style) + (line-direction + :initarg :line-direction + :initform :left-to-right + :accessor medium-line-direction) + (page-direction + :initarg :page-direction + :initform :top-to-bottom + :accessor medium-page-direction))) (defmethod (setf graphics-state) ((new-gs graphics-state) (gs graphics-state)) #+(or) "This is a no-op, but :after methods don't work without a primary method.") @@ -98,34 +128,11 @@ ;; in basic-medium makes hardware-based transformations hard. -- jd 2018-03-06 ()) -(defclass basic-medium (transform-coordinates-mixin complete-medium-state - multiline-medium-mixin medium) - (;; Graphics state slots - names must coincide with complete-medium-state. - (transformation :type transformation - :initarg :transformation - :initform +identity-transformation+ - :accessor medium-transformation) - (clipping-region :type region - :initarg :clipping-region - :initform +everywhere+ - :documentation "Clipping region in the SHEET coordinates.") - (ink :initarg :ink - :initform +foreground-ink+ - :accessor medium-ink) - (line-style :initarg :line-style - :initform (make-line-style) - :accessor medium-line-style) - (text-style :initarg :text-style - :initform *default-text-style* - :accessor medium-text-style - :type text-style) - (line-direction :initarg :line-direction - :initform :left-to-right - :accessor medium-line-direction) - (page-direction :initarg :page-direction - :initform :top-to-bottom - :accessor medium-page-direction) - ;; Default values +(defclass basic-medium (transform-coordinates-mixin + multiline-medium-mixin + complete-medium-state + medium) + (;; Default values (foreground :initarg :foreground :initform +black+ :accessor medium-foreground @@ -139,9 +146,9 @@ :accessor medium-default-text-style :type text-style) (sheet :initarg :sheet - :initform nil ; this means that medium is not linked to a sheet + :initform nil ;; NIL means that medium is not linked to a sheet :reader medium-sheet - :writer (setf %medium-sheet) ) + :writer (setf %medium-sheet)) (port :initarg :port :accessor port) (drawable :initform nil |