Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Issue 2142033002: Factor code to rotate a canvas about a point. (Closed)

Created:
4 years, 5 months ago by bungeman-skia
Modified:
4 years, 5 months ago
Reviewers:
mtklein, reed1
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Factor code to rotate a canvas about a point. SkMatrix::scale and ::rotate take a point around which to scale or rotate. Canvas lacks these helpers, so the code to rotate a canvas around a point has been duplicated many times. Factor all of these implementations into SkCanvas::rotate. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2142033002 Committed: https://skia.googlesource.com/skia/+/7438bfc0804d021aa92cdd5ea644994a4248f3db

Patch Set 1 #

Total comments: 1

Patch Set 2 : Move to canvas. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -86 lines) Patch
M bench/BitmapBench.cpp View 1 1 chunk +1 line, -4 lines 0 comments Download
M gm/dftext.cpp View 1 2 chunks +1 line, -9 lines 0 comments Download
M gm/fontscaler.cpp View 1 3 chunks +1 line, -12 lines 0 comments Download
M gm/fontscalerdistortable.cpp View 1 3 chunks +1 line, -9 lines 0 comments Download
M gm/imagefilterstransformed.cpp View 1 1 chunk +2 lines, -6 lines 0 comments Download
M gm/strokes.cpp View 1 2 chunks +1 line, -7 lines 0 comments Download
M gm/typeface.cpp View 1 2 chunks +2 lines, -13 lines 0 comments Download
M include/core/SkCanvas.h View 1 1 chunk +8 lines, -1 line 0 comments Download
M samplecode/SampleApp.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M samplecode/SampleCircle.cpp View 1 chunk +0 lines, -7 lines 0 comments Download
M samplecode/SampleDither.cpp View 1 1 chunk +1 line, -4 lines 0 comments Download
M samplecode/SampleFontScalerTest.cpp View 1 3 chunks +1 line, -8 lines 0 comments Download
M samplecode/SampleHT.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M src/core/SkCanvas.cpp View 1 1 chunk +6 lines, -0 lines 2 comments Download

Messages

Total messages: 23 (15 generated)
bungeman-skia
Maybe SkCanvas::rotate(degrees, px, py) would be of interest? https://codereview.chromium.org/2142033002/diff/1/gm/strokes.cpp File gm/strokes.cpp (left): https://codereview.chromium.org/2142033002/diff/1/gm/strokes.cpp#oldcode296 gm/strokes.cpp:296: canvas->concat(matrix); ...
4 years, 5 months ago (2016-07-12 15:47:11 UTC) #8
reed1
Happy if we want to add this to canvas (as non-virtual)
4 years, 5 months ago (2016-07-12 15:52:31 UTC) #9
bungeman-skia
Now on canvas.
4 years, 5 months ago (2016-07-12 16:23:36 UTC) #12
reed1
api lgtm At some point it'd be nice if we supported (clearly, with good names) ...
4 years, 5 months ago (2016-07-12 17:28:59 UTC) #17
bungeman-skia
https://codereview.chromium.org/2142033002/diff/20001/src/core/SkCanvas.cpp File src/core/SkCanvas.cpp (right): https://codereview.chromium.org/2142033002/diff/20001/src/core/SkCanvas.cpp#newcode1501 src/core/SkCanvas.cpp:1501: void SkCanvas::rotate(SkScalar degrees, SkScalar px, SkScalar py) { On ...
4 years, 5 months ago (2016-07-12 17:37:42 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2142033002/20001
4 years, 5 months ago (2016-07-12 17:39:52 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://skia.googlesource.com/skia/+/7438bfc0804d021aa92cdd5ea644994a4248f3db
4 years, 5 months ago (2016-07-12 22:01:24 UTC) #22
commit-bot: I haz the power
4 years, 5 months ago (2016-07-12 22:01:31 UTC) #23
Message was sent while issue was closed.
CQ bit was unchecked.

Powered by Google App Engine
This is Rietveld 408576698