summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/cairo
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/graphics/cairo')
-rw-r--r--WebCore/platform/graphics/cairo/FontCairo.cpp6
-rw-r--r--WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp26
-rw-r--r--WebCore/platform/graphics/cairo/ImageCairo.cpp4
-rw-r--r--WebCore/platform/graphics/cairo/PathCairo.cpp9
-rw-r--r--WebCore/platform/graphics/cairo/PatternCairo.cpp4
5 files changed, 10 insertions, 39 deletions
diff --git a/WebCore/platform/graphics/cairo/FontCairo.cpp b/WebCore/platform/graphics/cairo/FontCairo.cpp
index 3bfa8f3..169c74c 100644
--- a/WebCore/platform/graphics/cairo/FontCairo.cpp
+++ b/WebCore/platform/graphics/cairo/FontCairo.cpp
@@ -29,13 +29,13 @@
#include "config.h"
#include "Font.h"
+#include "AffineTransform.h"
#include "GlyphBuffer.h"
#include "Gradient.h"
#include "GraphicsContext.h"
#include "ImageBuffer.h"
#include "Pattern.h"
#include "SimpleFontData.h"
-#include "TransformationMatrix.h"
#define SYNTHETIC_OBLIQUE_ANGLE 14
@@ -136,7 +136,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
cairo_pop_group_to_source(cr);
}
} else if (context->fillPattern()) {
- TransformationMatrix affine;
+ AffineTransform affine;
cairo_set_source(cr, context->fillPattern()->createPlatformPattern(affine));
if (context->getAlpha() < 1.0f) {
cairo_push_group(cr);
@@ -166,7 +166,7 @@ void Font::drawGlyphs(GraphicsContext* context, const SimpleFontData* font, cons
cairo_pop_group_to_source(cr);
}
} else if (context->strokePattern()) {
- TransformationMatrix affine;
+ AffineTransform affine;
cairo_set_source(cr, context->strokePattern()->createPlatformPattern(affine));
if (context->getAlpha() < 1.0f) {
cairo_push_group(cr);
diff --git a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
index ccbbf3b..0aa6b83 100644
--- a/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
+++ b/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
@@ -45,7 +45,6 @@
#include "Pattern.h"
#include "SimpleFontData.h"
#include "SourceGraphic.h"
-#include "TransformationMatrix.h"
#include <cairo.h>
#include <math.h>
@@ -78,7 +77,7 @@ static inline void setPlatformFill(GraphicsContext* context, cairo_t* cr, Graphi
{
cairo_save(cr);
if (gcp->state.fillPattern) {
- TransformationMatrix affine;
+ AffineTransform affine;
cairo_set_source(cr, gcp->state.fillPattern->createPlatformPattern(affine));
} else if (gcp->state.fillGradient)
cairo_set_source(cr, gcp->state.fillGradient->platformGradient());
@@ -93,7 +92,7 @@ static inline void setPlatformStroke(GraphicsContext* context, cairo_t* cr, Grap
{
cairo_save(cr);
if (gcp->state.strokePattern) {
- TransformationMatrix affine;
+ AffineTransform affine;
cairo_set_source(cr, gcp->state.strokePattern->createPlatformPattern(affine));
} else if (gcp->state.strokeGradient)
cairo_set_source(cr, gcp->state.strokeGradient->platformGradient());
@@ -209,15 +208,7 @@ GraphicsContext::~GraphicsContext()
delete m_data;
}
-TransformationMatrix GraphicsContext::getCTM() const
-{
- cairo_t* cr = platformContext();
- cairo_matrix_t m;
- cairo_get_matrix(cr, &m);
- return TransformationMatrix(m.xx, m.yx, m.xy, m.yy, m.x0, m.y0);
-}
-
-AffineTransform GraphicsContext::getAffineCTM() const
+AffineTransform GraphicsContext::getCTM() const
{
cairo_t* cr = platformContext();
cairo_matrix_t m;
@@ -800,17 +791,6 @@ void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
notImplemented();
}
-void GraphicsContext::concatCTM(const TransformationMatrix& transform)
-{
- if (paintingDisabled())
- return;
-
- cairo_t* cr = m_data->cr;
- const cairo_matrix_t matrix = cairo_matrix_t(transform);
- cairo_transform(cr, &matrix);
- m_data->concatCTM(transform);
-}
-
void GraphicsContext::concatCTM(const AffineTransform& transform)
{
if (paintingDisabled())
diff --git a/WebCore/platform/graphics/cairo/ImageCairo.cpp b/WebCore/platform/graphics/cairo/ImageCairo.cpp
index 92e36fc..e74c495 100644
--- a/WebCore/platform/graphics/cairo/ImageCairo.cpp
+++ b/WebCore/platform/graphics/cairo/ImageCairo.cpp
@@ -30,12 +30,12 @@
#if PLATFORM(CAIRO)
+#include "AffineTransform.h"
#include "Color.h"
#include "FloatRect.h"
#include "GraphicsContext.h"
#include "ImageBuffer.h"
#include "ImageObserver.h"
-#include "TransformationMatrix.h"
#include <cairo.h>
#include <math.h>
#include <wtf/OwnPtr.h>
@@ -170,7 +170,7 @@ void BitmapImage::draw(GraphicsContext* context, const FloatRect& dst, const Flo
imageObserver()->didDraw(this);
}
-void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const TransformationMatrix& patternTransform,
+void Image::drawPattern(GraphicsContext* context, const FloatRect& tileRect, const AffineTransform& patternTransform,
const FloatPoint& phase, ColorSpace, CompositeOperator op, const FloatRect& destRect)
{
cairo_surface_t* image = nativeImageForCurrentFrame();
diff --git a/WebCore/platform/graphics/cairo/PathCairo.cpp b/WebCore/platform/graphics/cairo/PathCairo.cpp
index a265937..bc68b37 100644
--- a/WebCore/platform/graphics/cairo/PathCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PathCairo.cpp
@@ -26,7 +26,6 @@
#include "Path.h"
#include "AffineTransform.h"
-#include "TransformationMatrix.h"
#include "CairoPath.h"
#include "FloatRect.h"
#include "GraphicsContext.h"
@@ -335,14 +334,6 @@ void Path::transform(const AffineTransform& trans)
cairo_transform(m_cr, &c_matrix);
}
-void Path::transform(const TransformationMatrix& trans)
-{
- cairo_t* m_cr = platformPath()->m_cr;
- cairo_matrix_t c_matrix = cairo_matrix_t(trans);
- cairo_matrix_invert(&c_matrix);
- cairo_transform(m_cr, &c_matrix);
-}
-
String Path::debugString() const
{
if (isEmpty())
diff --git a/WebCore/platform/graphics/cairo/PatternCairo.cpp b/WebCore/platform/graphics/cairo/PatternCairo.cpp
index 58c5d00..b067acc 100644
--- a/WebCore/platform/graphics/cairo/PatternCairo.cpp
+++ b/WebCore/platform/graphics/cairo/PatternCairo.cpp
@@ -26,14 +26,14 @@
#include "config.h"
#include "Pattern.h"
+#include "AffineTransform.h"
#include "GraphicsContext.h"
-#include "TransformationMatrix.h"
#include <cairo.h>
namespace WebCore {
-cairo_pattern_t* Pattern::createPlatformPattern(const TransformationMatrix&) const
+cairo_pattern_t* Pattern::createPlatformPattern(const AffineTransform&) const
{
cairo_surface_t* surface = tileImage()->nativeImageForCurrentFrame();
if (!surface)