OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SKDRAWCOMMAND_H_ | 9 #ifndef SKDRAWCOMMAND_H_ |
10 #define SKDRAWCOMMAND_H_ | 10 #define SKDRAWCOMMAND_H_ |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 | 243 |
244 // The non-const 'paint' method allows modification of this object's | 244 // The non-const 'paint' method allows modification of this object's |
245 // SkPaint. For this reason the ctor and setPaint method make a local copy. | 245 // SkPaint. For this reason the ctor and setPaint method make a local copy. |
246 // The 'fPaintPtr' member acts a signal that the local SkPaint is valid | 246 // The 'fPaintPtr' member acts a signal that the local SkPaint is valid |
247 // (since only an SkPaint* is passed into the ctor). | 247 // (since only an SkPaint* is passed into the ctor). |
248 const SkPaint* paint() const { return fPaintPtr; } | 248 const SkPaint* paint() const { return fPaintPtr; } |
249 SkPaint* paint() { return fPaintPtr; } | 249 SkPaint* paint() { return fPaintPtr; } |
250 | 250 |
251 void setPaint(const SkPaint& paint) { fPaint = paint; fPaintPtr = &fPaint; } | 251 void setPaint(const SkPaint& paint) { fPaint = paint; fPaintPtr = &fPaint; } |
252 | 252 |
253 const SkRect* srcRect() const { return fSrc.isEmpty() ? NULL : &fSrc; } | 253 const SkRect* srcRect() const { return fSrc.isEmpty() ? nullptr : &fSrc; } |
254 void setSrcRect(const SkRect& src) { fSrc = src; } | 254 void setSrcRect(const SkRect& src) { fSrc = src; } |
255 | 255 |
256 const SkRect& dstRect() const { return fDst; } | 256 const SkRect& dstRect() const { return fDst; } |
257 void setDstRect(const SkRect& dst) { fDst = dst; } | 257 void setDstRect(const SkRect& dst) { fDst = dst; } |
258 | 258 |
259 SkCanvas::SrcRectConstraint constraint() const { return fConstraint; } | 259 SkCanvas::SrcRectConstraint constraint() const { return fConstraint; } |
260 void setConstraint(SkCanvas::SrcRectConstraint constraint) { fConstraint = c
onstraint; } | 260 void setConstraint(SkCanvas::SrcRectConstraint constraint) { fConstraint = c
onstraint; } |
261 | 261 |
262 private: | 262 private: |
263 SkBitmap fBitmap; | 263 SkBitmap fBitmap; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
594 void setUserMatrix(const SkMatrix&) override; | 594 void setUserMatrix(const SkMatrix&) override; |
595 void execute(SkCanvas* canvas) const override; | 595 void execute(SkCanvas* canvas) const override; |
596 private: | 596 private: |
597 SkMatrix fUserMatrix; | 597 SkMatrix fUserMatrix; |
598 SkMatrix fMatrix; | 598 SkMatrix fMatrix; |
599 | 599 |
600 typedef SkDrawCommand INHERITED; | 600 typedef SkDrawCommand INHERITED; |
601 }; | 601 }; |
602 | 602 |
603 #endif | 603 #endif |
OLD | NEW |