This repository has been archived by the owner on Mar 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 118
should native/device regions be clipped by parents? #1280
Labels
Comments
Currently we ignore parents. Alternative definitions would work something like this: (defgeneric sheet-device-region* (sheet)
(:method ((sheet mirrored-sheet-mixin))
(sheet-device-region sheet))
(:method ((sheet basic-sheet))
(region-intersection
(sheet-device-region sheet)
(sheet-device-region* (sheet-parent sheet)))))
(defgeneric sheet-native-region* (sheet)
(:method ((sheet mirrored-sheet-mixin))
(sheet-native-region sheet))
(:method ((sheet basic-sheet))
(region-intersection
(transform-region (sheet-native-transformation sheet)
(sheet-region sheet))
(sheet-native-region* (sheet-parent sheet)))))
;; this is not really correct, sheet-region should not be clipped.
;;(defgeneric sheet-region* (sheet)
;; (:method ((sheet mirrored-sheet-mixin))
;; (sheet-region sheet))
;; (:method (sheet)
;; (let ((transformation (sheet-transformation sheet)))
;; (untransform-region transformation
;; (region-intersection
;; (transform-region transformation (sheet-region sheet))
;; (sheet-region* (sheet-parent sheet))))))) |
dkochmanski
added a commit
that referenced
this issue
May 13, 2022
- previously repaint-sheet had two auxilliary :AFTER methods for propagating repaint to children and for finishing output. Depending on the order of the sheet superclasses SHEET-PARENT-MIXIN and SHEET-WITH-MEDIUM-MIXIN the order of evaluation of :AFTER methods was different: 1. handle-repaint, propagate-repaint, and finish-output, or 2. handle-repaint, finish-output, and propagate-repaint the second scenario may lead to an error, when the method medium-finish-output ignores mediums without a sheet with the direct mirror and flushes only the mirrored medium. In that case we sap the buffer with cleaned background and then we repaint children - no output is visible - we are more precise with computing regions for the repaint and for clearing the medium area by introducing a helper function SHEET-VISIBLE-AREA. See the issue #1280 to learn details behind the function SHEET-NATIVE-REGION*. - REPAINT-SHEET calls REPAINT-SHEET recursively on its children. This is more compatible with the spec; previously we've skipped mirrors, but that was not correct because REPAINT-SHEET may be also called from the user code, and that may be i.e because the model behind the child mirrored sheet also changed - REPAINT-SHEET on SHEET-MUTE-REPAINTING-MIXIN now does nothing. This is what the specification says (while we've defined empty method HANDLE-REPAINT)
dkochmanski
added a commit
that referenced
this issue
May 13, 2022
- previously repaint-sheet had two auxilliary :AFTER methods for propagating repaint to children and for finishing output. Depending on the order of the sheet superclasses SHEET-PARENT-MIXIN and SHEET-WITH-MEDIUM-MIXIN the order of evaluation of :AFTER methods was different: 1. handle-repaint, propagate-repaint, and finish-output, or 2. handle-repaint, finish-output, and propagate-repaint the second scenario may lead to an error, when the method medium-finish-output ignores mediums without a sheet with the direct mirror and flushes only the mirrored medium. In that case we sap the buffer with cleaned background and then we repaint children - no output is visible - we are more precise with computing regions for the repaint and for clearing the medium area by introducing a helper function SHEET-VISIBLE-AREA. See the issue #1280 to learn details behind the function SHEET-NATIVE-REGION*. - REPAINT-SHEET calls REPAINT-SHEET recursively on its children. This is more compatible with the spec; previously we've skipped mirrors, but that was not correct because REPAINT-SHEET may be also called from the user code, and that may be i.e because the model behind the child mirrored sheet also changed - REPAINT-SHEET on SHEET-MUTE-REPAINTING-MIXIN now does nothing. This is what the specification says (while we've defined empty method HANDLE-REPAINT)
dkochmanski
added a commit
that referenced
this issue
May 13, 2022
- previously repaint-sheet had two auxilliary :AFTER methods for propagating repaint to children and for finishing output. Depending on the order of the sheet superclasses SHEET-PARENT-MIXIN and SHEET-WITH-MEDIUM-MIXIN the order of evaluation of :AFTER methods was different: 1. handle-repaint, propagate-repaint, and finish-output, or 2. handle-repaint, finish-output, and propagate-repaint the second scenario may lead to an error, when the method medium-finish-output ignores mediums without a sheet with the direct mirror and flushes only the mirrored medium. In that case we sap the buffer with cleaned background and then we repaint children - no output is visible - we are more precise with computing regions for the repaint and for clearing the medium area by introducing a helper function SHEET-VISIBLE-AREA. See the issue #1280 to learn details behind the function SHEET-NATIVE-REGION*. - REPAINT-SHEET calls REPAINT-SHEET recursively on its children. This is more compatible with the spec; previously we've skipped mirrors, but that was not correct because REPAINT-SHEET may be also called from the user code, and that may be i.e because the model behind the child mirrored sheet also changed - REPAINT-SHEET on SHEET-MUTE-REPAINTING-MIXIN now does nothing. This is what the specification says (while we've defined empty method HANDLE-REPAINT)
dkochmanski
added a commit
that referenced
this issue
May 31, 2022
- previously repaint-sheet had two auxilliary :AFTER methods for propagating repaint to children and for finishing output. Depending on the order of the sheet superclasses SHEET-PARENT-MIXIN and SHEET-WITH-MEDIUM-MIXIN the order of evaluation of :AFTER methods was different: 1. handle-repaint, propagate-repaint, and finish-output, or 2. handle-repaint, finish-output, and propagate-repaint the second scenario may lead to an error, when the method medium-finish-output ignores mediums without a sheet with the direct mirror and flushes only the mirrored medium. In that case we sap the buffer with cleaned background and then we repaint children - no output is visible - we are more precise with computing regions for the repaint and for clearing the medium area by introducing a helper function SHEET-VISIBLE-AREA. See the issue #1280 to learn details behind the function SHEET-NATIVE-REGION*. - REPAINT-SHEET calls REPAINT-SHEET recursively on its children. This is more compatible with the spec; previously we've skipped mirrors, but that was not correct because REPAINT-SHEET may be also called from the user code, and that may be i.e because the model behind the child mirrored sheet also changed - REPAINT-SHEET on SHEET-MUTE-REPAINTING-MIXIN now does nothing. This is what the specification says (while we've defined empty method HANDLE-REPAINT)
dkochmanski
added a commit
that referenced
this issue
Jun 21, 2022
- previously repaint-sheet had two auxilliary :AFTER methods for propagating repaint to children and for finishing output. Depending on the order of the sheet superclasses SHEET-PARENT-MIXIN and SHEET-WITH-MEDIUM-MIXIN the order of evaluation of :AFTER methods was different: 1. handle-repaint, propagate-repaint, and finish-output, or 2. handle-repaint, finish-output, and propagate-repaint the second scenario may lead to an error, when the method medium-finish-output ignores mediums without a sheet with the direct mirror and flushes only the mirrored medium. In that case we sap the buffer with cleaned background and then we repaint children - no output is visible - we are more precise with computing regions for the repaint and for clearing the medium area by introducing a helper function SHEET-VISIBLE-AREA. See the issue #1280 to learn details behind the function SHEET-NATIVE-REGION*. - REPAINT-SHEET calls REPAINT-SHEET recursively on its children. This is more compatible with the spec; previously we've skipped mirrors, but that was not correct because REPAINT-SHEET may be also called from the user code, and that may be i.e because the model behind the child mirrored sheet also changed - REPAINT-SHEET on SHEET-MUTE-REPAINTING-MIXIN now does nothing. This is what the specification says (while we've defined empty method HANDLE-REPAINT)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Should the function (sheet-native-region sheet) return the region of the sheet in native coordinates, or that region should be additionally clipped by the sheet parents?
The text was updated successfully, but these errors were encountered: