08895c4814
Replace manually entered summary tables with ones that are populated and sorted by bookmaker. This introduces a slight regression for anonymous enums but fixes a lot of bugs and omissions. The format is #Topic somethingTopical #Populate ## where somethingTopical is one of Subtopics, Constructors, Constants, Classes_and_Structs, Members, Member_Functions, and Related_Functions. Fix the bad formatting in SkCanvas reference. The #Error tag was was corrupting the markdown table. Remove the tag and replace it with #NoExample. Next up: revise self-check to know about populated topics. TBR=caryclark@google.com Docs-Preview: https://skia.org/?cl=102080 Bug: skia:6898 Change-Id: Idef5d1c14c740c18a81d6a5106182788dd2a09e1 Reviewed-on: https://skia-review.googlesource.com/102080 Commit-Queue: Cary Clark <caryclark@skia.org> Reviewed-by: Cary Clark <caryclark@skia.org>
3.6 KiB
3.6 KiB
SkAutoCanvasRestore Reference
Automatic Canvas Restore
Overview
Subtopics
name | description |
---|---|
Constructors | functions that construct SkAutoCanvasRestore |
Member Functions | static functions and member methods |
Class SkAutoCanvasRestore
Stack helper class calls
Constructors
name | description |
---|---|
SkAutoCanvasRestore(SkCanvas* canvas, bool doSave) | preserves Canvas save count |
~SkAutoCanvasRestore() | restores Canvas to saved state |
Member Functions
name | description |
---|---|
restore | restores Canvas to saved state |
SkAutoCanvasRestore
SkAutoCanvasRestore(SkCanvas* canvas, bool doSave)
Preserves Canvas save count. Optionally saves Canvas Clip and Canvas Matrix.
Parameters
canvas | Canvas to guard |
doSave | call SkCanvas::save() |
Return Value
utility to restore Canvas state on destructor
Example
See Also
SkCanvas::save SkCanvas::restore
~SkAutoCanvasRestore
~SkAutoCanvasRestore()
Restores Canvas to saved state. Destructor is called when container goes out of scope.
See Also
SkCanvas::save SkCanvas::restore
restore
void restore()
Restores Canvas to saved state immediately. Subsequent calls and ~SkAutoCanvasRestore have no effect.
Example
Example Output
saveCanvas: false before restore: 2
saveCanvas: false after restore: 2
saveCanvas: true before restore: 2
saveCanvas: true after restore: 2
saveCanvas: false before restore: 2
saveCanvas: false after restore: 1
saveCanvas: true before restore: 2
saveCanvas: true after restore: 1
final count: 1
See Also
SkCanvas::save SkCanvas::restore