|
Lines 34-41
a/Source/WebCore/platform/graphics/GraphicsContext.cpp_sec1
|
| 34 |
#include "RoundedRect.h" |
34 |
#include "RoundedRect.h" |
| 35 |
#include "TextRun.h" |
35 |
#include "TextRun.h" |
| 36 |
|
36 |
|
| 37 |
#include "stdio.h" |
|
|
| 38 |
|
| 39 |
using namespace std; |
37 |
using namespace std; |
| 40 |
|
38 |
|
| 41 |
namespace WebCore { |
39 |
namespace WebCore { |
|
Lines 469-507
void GraphicsContext::drawHighlightForText(const Font& font, const TextRun& run,
a/Source/WebCore/platform/graphics/GraphicsContext.cpp_sec2
|
| 469 |
fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace); |
467 |
fillRect(font.selectionRectForText(run, point, h, from, to), backgroundColor, colorSpace); |
| 470 |
} |
468 |
} |
| 471 |
|
469 |
|
| 472 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation) |
470 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& p, CompositeOperator op, ImageOrientationEnum orientation, RespectImageOrientationEnum shouldRespectImageOrientation) |
| 473 |
{ |
471 |
{ |
| 474 |
if (!image) |
472 |
if (!image) |
| 475 |
return; |
473 |
return; |
| 476 |
drawImage(image, styleColorSpace, FloatRect(IntRect(p, image->size())), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation); |
474 |
drawImage(image, styleColorSpace, FloatRect(IntRect(p, image->size())), FloatRect(FloatPoint(), FloatSize(image->size())), op, orientation, shouldRespectImageOrientation); |
| 477 |
} |
475 |
} |
| 478 |
|
476 |
|
| 479 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
477 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntRect& r, CompositeOperator op, ImageOrientationEnum orientation, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
| 480 |
{ |
478 |
{ |
| 481 |
if (!image) |
479 |
if (!image) |
| 482 |
return; |
480 |
return; |
| 483 |
drawImage(image, styleColorSpace, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, shouldRespectImageOrientation, useLowQualityScale); |
481 |
drawImage(image, styleColorSpace, FloatRect(r), FloatRect(FloatPoint(), FloatSize(image->size())), op, orientation, shouldRespectImageOrientation, useLowQualityScale); |
| 484 |
} |
482 |
} |
| 485 |
|
483 |
|
| 486 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation) |
484 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const IntPoint& dest, const IntRect& srcRect, CompositeOperator op, ImageOrientationEnum orientation, RespectImageOrientationEnum shouldRespectImageOrientation) |
| 487 |
{ |
485 |
{ |
| 488 |
drawImage(image, styleColorSpace, FloatRect(IntRect(dest, srcRect.size())), FloatRect(srcRect), op, shouldRespectImageOrientation); |
486 |
drawImage(image, styleColorSpace, FloatRect(IntRect(dest, srcRect.size())), FloatRect(srcRect), op, orientation, shouldRespectImageOrientation); |
| 489 |
} |
487 |
} |
| 490 |
|
488 |
|
| 491 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
489 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, ImageOrientationEnum orientation, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
| 492 |
{ |
490 |
{ |
| 493 |
drawImage(image, styleColorSpace, dest, src, op, BlendModeNormal, shouldRespectImageOrientation, useLowQualityScale); |
491 |
drawImage(image, styleColorSpace, dest, src, op, BlendModeNormal, orientation, shouldRespectImageOrientation, useLowQualityScale); |
| 494 |
} |
492 |
} |
| 495 |
|
493 |
|
| 496 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest) |
494 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, ImageOrientationEnum) |
| 497 |
{ |
495 |
{ |
| 498 |
if (!image) |
496 |
if (!image) |
| 499 |
return; |
497 |
return; |
| 500 |
drawImage(image, styleColorSpace, dest, FloatRect(IntRect(IntPoint(), image->size()))); |
498 |
drawImage(image, styleColorSpace, dest, FloatRect(IntRect(IntPoint(), image->size()))); |
| 501 |
} |
499 |
} |
| 502 |
|
500 |
|
| 503 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
501 |
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const FloatRect& dest, const FloatRect& src, CompositeOperator op, BlendMode blendMode, ImageOrientationEnum orientation, RespectImageOrientationEnum shouldRespectImageOrientation, bool useLowQualityScale) |
| 504 |
{ if (paintingDisabled() || !image) |
502 |
{ |
|
|
503 |
if (paintingDisabled() || !image) |
| 505 |
return; |
504 |
return; |
| 506 |
|
505 |
|
| 507 |
InterpolationQuality previousInterpolationQuality = InterpolationDefault; |
506 |
InterpolationQuality previousInterpolationQuality = InterpolationDefault; |
|
Lines 512-518
void GraphicsContext::drawImage(Image* image, ColorSpace styleColorSpace, const
a/Source/WebCore/platform/graphics/GraphicsContext.cpp_sec3
|
| 512 |
setImageInterpolationQuality(InterpolationNone); |
511 |
setImageInterpolationQuality(InterpolationNone); |
| 513 |
} |
512 |
} |
| 514 |
|
513 |
|
| 515 |
image->draw(this, dest, src, styleColorSpace, op, blendMode, shouldRespectImageOrientation); |
514 |
image->draw(this, dest, src, styleColorSpace, op, blendMode, orientation, shouldRespectImageOrientation); |
| 516 |
|
515 |
|
| 517 |
if (useLowQualityScale) |
516 |
if (useLowQualityScale) |
| 518 |
setImageInterpolationQuality(previousInterpolationQuality); |
517 |
setImageInterpolationQuality(previousInterpolationQuality); |
|
Lines 540-546
void GraphicsContext::drawTiledImage(Image* image, ColorSpace styleColorSpace, c
a/Source/WebCore/platform/graphics/GraphicsContext.cpp_sec4
|
| 540 |
|
539 |
|
| 541 |
if (hRule == Image::StretchTile && vRule == Image::StretchTile) { |
540 |
if (hRule == Image::StretchTile && vRule == Image::StretchTile) { |
| 542 |
// Just do a scale. |
541 |
// Just do a scale. |
| 543 |
drawImage(image, styleColorSpace, dest, srcRect, op); |
542 |
drawImage(image, styleColorSpace, dest, srcRect, op, DefaultImageOrientation); |
| 544 |
return; |
543 |
return; |
| 545 |
} |
544 |
} |
| 546 |
|
545 |
|