OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008-2009 Torch Mobile, Inc. | 3 * Copyright (C) 2008-2009 Torch Mobile, Inc. |
4 * Copyright (C) 2013 Google Inc. All rights reserved. | 4 * Copyright (C) 2013 Google Inc. All rights reserved. |
5 * | 5 * |
6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
8 * are met: | 8 * are met: |
9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 void drawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkP
aint* = 0); | 283 void drawBitmapRect(const SkBitmap&, const SkRect*, const SkRect&, const SkP
aint* = 0); |
284 void drawOval(const SkRect&, const SkPaint&); | 284 void drawOval(const SkRect&, const SkPaint&); |
285 void drawPath(const SkPath&, const SkPaint&); | 285 void drawPath(const SkPath&, const SkPaint&); |
286 void drawRect(const SkRect&, const SkPaint&); | 286 void drawRect(const SkRect&, const SkPaint&); |
287 void drawPosText(const void* text, size_t byteLength, const SkPoint pos[], c
onst SkRect& textRect, const SkPaint&); | 287 void drawPosText(const void* text, size_t byteLength, const SkPoint pos[], c
onst SkRect& textRect, const SkPaint&); |
288 void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[]
, SkScalar constY, const SkRect& textRect, const SkPaint&); | 288 void drawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[]
, SkScalar constY, const SkRect& textRect, const SkPaint&); |
289 void drawTextBlob(const SkTextBlob*, const SkPoint& origin, const SkPaint&); | 289 void drawTextBlob(const SkTextBlob*, const SkPoint& origin, const SkPaint&); |
290 | 290 |
291 void clip(const IntRect& rect) { clipRect(rect); } | 291 void clip(const IntRect& rect) { clipRect(rect); } |
292 void clip(const FloatRect& rect) { clipRect(rect); } | 292 void clip(const FloatRect& rect) { clipRect(rect); } |
293 void clipRoundedRect(const RoundedRect&, SkRegion::Op = SkRegion::kIntersect
_Op); | 293 void clipRoundedRect(const RoundedRect&, SkClipOp = kIntersect_SkClipOp); |
294 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, SkRegion:
:kDifference_Op); } | 294 void clipOut(const IntRect& rect) { clipRect(rect, NotAntiAliased, kDifferen
ce_SkClipOp); } |
295 void clipOut(const Path&); | 295 void clipOut(const Path&); |
296 void clipOutRoundedRect(const RoundedRect&); | 296 void clipOutRoundedRect(const RoundedRect&); |
297 void clipPath(const Path&, WindRule = RULE_EVENODD, AntiAliasingMode = AntiA
liased); | 297 void clipPath(const Path&, WindRule = RULE_EVENODD, AntiAliasingMode = AntiA
liased); |
298 void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); | 298 void clipPath(const SkPath&, AntiAliasingMode = NotAntiAliased, SkClipOp = k
Intersect_SkClipOp); |
299 void clipPolygon(size_t numPoints, const FloatPoint*, bool antialias); | 299 void clipPolygon(size_t numPoints, const FloatPoint*, bool antialias); |
300 void clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkRegion::Op
= SkRegion::kIntersect_Op); | 300 void clipRect(const SkRect&, AntiAliasingMode = NotAntiAliased, SkClipOp = k
Intersect_SkClipOp); |
301 | 301 |
302 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); | 302 void drawText(const Font&, const TextRunPaintInfo&, const FloatPoint&); |
303 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr
ing& mark, const FloatPoint&); | 303 void drawEmphasisMarks(const Font&, const TextRunPaintInfo&, const AtomicStr
ing& mark, const FloatPoint&); |
304 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F
ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady); | 304 void drawBidiText(const Font&, const TextRunPaintInfo&, const FloatPoint&, F
ont::CustomFontNotReadyAction = Font::DoNotPaintIfFontNotReady); |
305 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in
t h, const Color& backgroundColor, int from = 0, int to = -1); | 305 void drawHighlightForText(const Font&, const TextRun&, const FloatPoint&, in
t h, const Color& backgroundColor, int from = 0, int to = -1); |
306 | 306 |
307 void drawLineForText(const FloatPoint&, float width, bool printing); | 307 void drawLineForText(const FloatPoint&, float width, bool printing); |
308 enum DocumentMarkerLineStyle { | 308 enum DocumentMarkerLineStyle { |
309 DocumentMarkerSpellingLineStyle, | 309 DocumentMarkerSpellingLineStyle, |
310 DocumentMarkerGrammarLineStyle | 310 DocumentMarkerGrammarLineStyle |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 | 421 |
422 void saveLayer(const SkRect* bounds, const SkPaint*); | 422 void saveLayer(const SkRect* bounds, const SkPaint*); |
423 void restoreLayer(); | 423 void restoreLayer(); |
424 | 424 |
425 // Helpers for drawing a focus ring (drawFocusRing) | 425 // Helpers for drawing a focus ring (drawFocusRing) |
426 float prepareFocusRingPaint(SkPaint&, const Color&, int width) const; | 426 float prepareFocusRingPaint(SkPaint&, const Color&, int width) const; |
427 void drawFocusRingPath(const SkPath&, const Color&, int width); | 427 void drawFocusRingPath(const SkPath&, const Color&, int width); |
428 void drawFocusRingRect(const SkRect&, const Color&, int width); | 428 void drawFocusRingRect(const SkRect&, const Color&, int width); |
429 | 429 |
430 // SkCanvas wrappers. | 430 // SkCanvas wrappers. |
431 void clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkRegion::
Op = SkRegion::kIntersect_Op); | 431 void clipRRect(const SkRRect&, AntiAliasingMode = NotAntiAliased, SkClipOp =
kIntersect_SkClipOp); |
432 void concat(const SkMatrix&); | 432 void concat(const SkMatrix&); |
433 void drawRRect(const SkRRect&, const SkPaint&); | 433 void drawRRect(const SkRRect&, const SkPaint&); |
434 | 434 |
435 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); | 435 void setDropShadowImageFilter(PassRefPtr<SkImageFilter>); |
436 void clearDropShadowImageFilter(); | 436 void clearDropShadowImageFilter(); |
437 SkImageFilter* dropShadowImageFilter() const { return immutableState()->drop
ShadowImageFilter(); } | 437 SkImageFilter* dropShadowImageFilter() const { return immutableState()->drop
ShadowImageFilter(); } |
438 | 438 |
439 // Apply deferred paint state saves | 439 // Apply deferred paint state saves |
440 void realizePaintSave() | 440 void realizePaintSave() |
441 { | 441 { |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
504 unsigned m_accelerated : 1; | 504 unsigned m_accelerated : 1; |
505 unsigned m_isCertainlyOpaque : 1; | 505 unsigned m_isCertainlyOpaque : 1; |
506 unsigned m_printing : 1; | 506 unsigned m_printing : 1; |
507 unsigned m_antialiasHairlineImages : 1; | 507 unsigned m_antialiasHairlineImages : 1; |
508 unsigned m_shouldSmoothFonts : 1; | 508 unsigned m_shouldSmoothFonts : 1; |
509 }; | 509 }; |
510 | 510 |
511 } // namespace blink | 511 } // namespace blink |
512 | 512 |
513 #endif // GraphicsContext_h | 513 #endif // GraphicsContext_h |
OLD | NEW |