| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_GFX_CANVAS_H_ | 5 #ifndef UI_GFX_CANVAS_H_ |
| 6 #define UI_GFX_CANVAS_H_ | 6 #define UI_GFX_CANVAS_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 void DrawPoint(const Point& p, const cc::PaintFlags& flags); | 272 void DrawPoint(const Point& p, const cc::PaintFlags& flags); |
| 273 | 273 |
| 274 // Draw the given point with the given |flags| parameters. | 274 // Draw the given point with the given |flags| parameters. |
| 275 void DrawPoint(const PointF& p, const cc::PaintFlags& flags); | 275 void DrawPoint(const PointF& p, const cc::PaintFlags& flags); |
| 276 | 276 |
| 277 // Draws a single pixel line with the specified color. | 277 // Draws a single pixel line with the specified color. |
| 278 // DEPRECATED in favor of the RectF version below. | 278 // DEPRECATED in favor of the RectF version below. |
| 279 // TODO(funkysidd): Remove this (http://crbug.com/553726) | 279 // TODO(funkysidd): Remove this (http://crbug.com/553726) |
| 280 void DrawLine(const Point& p1, const Point& p2, SkColor color); | 280 void DrawLine(const Point& p1, const Point& p2, SkColor color); |
| 281 | 281 |
| 282 // Draws a single pixel line with the specified color. | 282 // Draws a single dip line with the specified color. |
| 283 void DrawLine(const PointF& p1, const PointF& p2, SkColor color); | 283 void DrawLine(const PointF& p1, const PointF& p2, SkColor color); |
| 284 | 284 |
| 285 // Draws a line with the given |flags| parameters. | 285 // Draws a line with the given |flags| parameters. |
| 286 // DEPRECATED in favor of the RectF version below. | 286 // DEPRECATED in favor of the RectF version below. |
| 287 // TODO(funkysidd): Remove this (http://crbug.com/553726) | 287 // TODO(funkysidd): Remove this (http://crbug.com/553726) |
| 288 void DrawLine(const Point& p1, const Point& p2, const cc::PaintFlags& flags); | 288 void DrawLine(const Point& p1, const Point& p2, const cc::PaintFlags& flags); |
| 289 | 289 |
| 290 // Draws a line with the given |flags| parameters. | 290 // Draws a line with the given |flags| parameters. |
| 291 void DrawLine(const PointF& p1, | 291 void DrawLine(const PointF& p1, |
| 292 const PointF& p2, | 292 const PointF& p2, |
| 293 const cc::PaintFlags& flags); | 293 const cc::PaintFlags& flags); |
| 294 | 294 |
| 295 // Draws a line that's a single DIP. At fractional scale factors, this is | 295 // Draws a line that's a single DIP. At fractional scale factors, this is |
| 296 // floored to the nearest integral number of pixels. | 296 // floored to the nearest integral number of pixels. |
| 297 void DrawSharpLine(PointF p1, PointF p2, SkColor color); | 297 void DrawSharpLine(PointF p1, PointF p2, SkColor color); |
| 298 | 298 |
| 299 // As above, but draws a single pixel at all scale factors. |
| 300 void Draw1pxLine(PointF p1, PointF p2, SkColor color); |
| 301 |
| 299 // Draws a circle with the given |flags| parameters. | 302 // Draws a circle with the given |flags| parameters. |
| 300 // DEPRECATED in favor of the RectF version below. | 303 // DEPRECATED in favor of the RectF version below. |
| 301 // TODO(funkysidd): Remove this (http://crbug.com/553726) | 304 // TODO(funkysidd): Remove this (http://crbug.com/553726) |
| 302 void DrawCircle(const Point& center_point, | 305 void DrawCircle(const Point& center_point, |
| 303 int radius, | 306 int radius, |
| 304 const cc::PaintFlags& flags); | 307 const cc::PaintFlags& flags); |
| 305 | 308 |
| 306 // Draws a circle with the given |flags| parameters. | 309 // Draws a circle with the given |flags| parameters. |
| 307 void DrawCircle(const PointF& center_point, | 310 void DrawCircle(const PointF& center_point, |
| 308 float radius, | 311 float radius, |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 // but surface_ will be null. | 515 // but surface_ will be null. |
| 513 sk_sp<cc::PaintSurface> surface_; | 516 sk_sp<cc::PaintSurface> surface_; |
| 514 cc::PaintCanvas* canvas_; | 517 cc::PaintCanvas* canvas_; |
| 515 | 518 |
| 516 DISALLOW_COPY_AND_ASSIGN(Canvas); | 519 DISALLOW_COPY_AND_ASSIGN(Canvas); |
| 517 }; | 520 }; |
| 518 | 521 |
| 519 } // namespace gfx | 522 } // namespace gfx |
| 520 | 523 |
| 521 #endif // UI_GFX_CANVAS_H_ | 524 #endif // UI_GFX_CANVAS_H_ |
| OLD | NEW |