OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2008, Google Inc. All rights reserved. | 2 * Copyright (c) 2008, Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 void PlatformContextSkia::beginPath() | 374 void PlatformContextSkia::beginPath() |
375 { | 375 { |
376 m_path.reset(); | 376 m_path.reset(); |
377 } | 377 } |
378 | 378 |
379 void PlatformContextSkia::addPath(const SkPath& path) | 379 void PlatformContextSkia::addPath(const SkPath& path) |
380 { | 380 { |
381 m_path.addPath(path, m_canvas->getTotalMatrix()); | 381 m_path.addPath(path, m_canvas->getTotalMatrix()); |
382 } | 382 } |
383 | 383 |
384 SkPath PlatformContextSkia::currentPathInLocalCoordinates() const { | 384 SkPath PlatformContextSkia::currentPath() const { |
385 SkPath local_path = m_path; | 385 SkPath local_path = m_path; |
386 const SkMatrix& matrix = m_canvas->getTotalMatrix(); | 386 const SkMatrix& matrix = m_canvas->getTotalMatrix(); |
387 SkMatrix inverse_matrix; | 387 SkMatrix inverse_matrix; |
388 matrix.invert(&inverse_matrix); | 388 matrix.invert(&inverse_matrix); |
389 local_path.transform(inverse_matrix); | 389 local_path.transform(inverse_matrix); |
390 return local_path; | 390 return local_path; |
391 } | 391 } |
392 | 392 |
393 void PlatformContextSkia::setFillRule(SkPath::FillType fr) | 393 void PlatformContextSkia::setFillRule(SkPath::FillType fr) |
394 { | 394 { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 const SkBitmap* PlatformContextSkia::bitmap() const | 428 const SkBitmap* PlatformContextSkia::bitmap() const |
429 { | 429 { |
430 return &m_canvas->getDevice()->accessBitmap(false); | 430 return &m_canvas->getDevice()->accessBitmap(false); |
431 } | 431 } |
432 | 432 |
433 bool PlatformContextSkia::isPrinting() | 433 bool PlatformContextSkia::isPrinting() |
434 { | 434 { |
435 return m_canvas->getTopPlatformDevice().IsVectorial(); | 435 return m_canvas->getTopPlatformDevice().IsVectorial(); |
436 } | 436 } |
OLD | NEW |