1,295
edits
(→Clips) |
(→Clips) |
||
| Line 86: | Line 86: | ||
== Clips == | == Clips == | ||
Logically a Clip is the intersection of zero or more | Logically a Clip is the intersection of zero or more device-space paths, but we should special-case rectangular Clips since they're very common. | ||
''We treat Clips in a similar way to Paths: lightweight, not-heap-allocated wrappers around platform object pointers.'' Clips are immutable once created. (You can however overwrite one Clip value with another.) | ''We treat Clips in a similar way to Paths: lightweight, not-heap-allocated wrappers around platform object pointers.'' Clips are immutable once created. (You can however overwrite one Clip value with another.) | ||
| Line 102: | Line 102: | ||
// These methods are non-pure-virtual just so we can instantiate an empty | // These methods are non-pure-virtual just so we can instantiate an empty | ||
// Clip object to be overwritten later. | // Clip object to be overwritten later. | ||
virtual void CombineWith(const Rect& aRect, Clip* aDest) const { assert(false); } | virtual void CombineWith(const Matrix& aCTM, const Rect& aRect, Clip* aDest) const { assert(false); } | ||
// Path must have matching backend type | // Path must have matching backend type | ||
virtual void CombineWith(const Path& aPath, Clip* aDest) const { assert(false); } | virtual void CombineWith(const Matrix& aCTM, const Path& aPath, Clip* aDest) const { assert(false); } | ||
virtual Rect GetExtents() { assert(false); } | virtual Rect GetExtents() { assert(false); } | ||
edits