diff options
Diffstat (limited to 'WebCore/platform/graphics/wince')
7 files changed, 27 insertions, 38 deletions
diff --git a/WebCore/platform/graphics/wince/FontCacheWince.cpp b/WebCore/platform/graphics/wince/FontCacheWince.cpp index f67f1b4..3262fc0 100644 --- a/WebCore/platform/graphics/wince/FontCacheWince.cpp +++ b/WebCore/platform/graphics/wince/FontCacheWince.cpp @@ -316,16 +316,16 @@ const SimpleFontData* FontCache::getFontDataForCharacters(const Font& font, cons return 0; } -FontPlatformData* FontCache::getSimilarFontPlatformData(const Font& font) +SimpleFontData* FontCache::getSimilarFontPlatformData(const Font& font) { return 0; } -FontPlatformData* FontCache::getLastResortFallbackFont(const FontDescription& fontDesc) +SimpleFontData* FontCache::getLastResortFallbackFont(const FontDescription& fontDesc) { // FIXME: Would be even better to somehow get the user's default font here. For now we'll pick // the default that the user would get without changing any prefs. - return getCachedFontPlatformData(fontDesc, FontPlatformData::defaultFontFamily()); + return getCachedFontData(fontDesc, FontPlatformData::defaultFontFamily()); } FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontDescription, const AtomicString& family) diff --git a/WebCore/platform/graphics/wince/FontWince.cpp b/WebCore/platform/graphics/wince/FontWince.cpp index d00336b..6c03712 100644 --- a/WebCore/platform/graphics/wince/FontWince.cpp +++ b/WebCore/platform/graphics/wince/FontWince.cpp @@ -29,6 +29,7 @@ #include "config.h" #include "Font.h" +#include "AffineTransform.h" #include "FloatRect.h" #include "FontCache.h" #include "FontData.h" @@ -37,7 +38,6 @@ #include "GraphicsContext.h" #include "IntRect.h" #include "NotImplemented.h" -#include "TransformationMatrix.h" #include "WidthIterator.h" #include <wtf/MathExtras.h> #include <wtf/OwnPtr.h> diff --git a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp index 410aeb1..42e94a4 100644 --- a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp +++ b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp @@ -31,7 +31,6 @@ #include "PlatformPathWince.h" #include "SharedBitmap.h" #include "SimpleFontData.h" -#include "TransformationMatrix.h" #include <wtf/OwnPtr.h> #include <windows.h> @@ -169,7 +168,7 @@ public: { } - TransformationMatrix m_transform; + AffineTransform m_transform; float m_opacity; Vector<Path> m_paths; }; @@ -212,7 +211,7 @@ public: m_transform.rotate(rad2deg(radians)); } - void concatCTM(const TransformationMatrix& transform) + void concatCTM(const AffineTransform& transform) { m_transform = transform * m_transform; } @@ -1149,11 +1148,6 @@ void GraphicsContext::concatCTM(const AffineTransform& transform) m_data->concatCTM(transform); } -void GraphicsContext::concatCTM(const TransformationMatrix& transform) -{ - m_data->concatCTM(transform); -} - TransformationMatrix& GraphicsContext::affineTransform() { return m_data->m_transform; @@ -1386,7 +1380,7 @@ void GraphicsContext::fillPath() if (!dc) continue; - TransformationMatrix tr = m_data->m_transform; + AffineTransform tr = m_data->m_transform; tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height()); SelectObject(dc, GetStockObject(NULL_PEN)); @@ -1426,7 +1420,7 @@ void GraphicsContext::strokePath() if (!dc) continue; - TransformationMatrix tr = m_data->m_transform; + AffineTransform tr = m_data->m_transform; tr.translate(transparentDC.toShift().width(), transparentDC.toShift().height()); SelectObject(dc, GetStockObject(NULL_BRUSH)); @@ -1537,12 +1531,7 @@ void GraphicsContext::fillRect(const FloatRect& r, const Gradient* gradient) GradientFill(dc, tv.data(), tv.size(), mesh.data(), mesh.size(), vertical ? GRADIENT_FILL_RECT_V : GRADIENT_FILL_RECT_H); } -AffineTransform GraphicsContext::getAffineCTM() const -{ - return m_data->m_transform; -} - -TransformationMatrix GraphicsContext::getCTM() const +AffineTransform GraphicsContext::getCTM() const { return m_data->m_transform; } @@ -1885,7 +1874,7 @@ void GraphicsContext::drawBitmap(SharedBitmap* bmp, const IntRect& dstRectIn, co transparentDC.fillAlphaChannel(); } -void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tileRectIn, const TransformationMatrix& patternTransform, +void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, CompositeOperator op, const FloatRect& destRectIn, const IntSize& origSourceSize) { if (!m_data->m_opacity) @@ -1904,7 +1893,7 @@ void GraphicsContext::drawBitmapPattern(SharedBitmap* bmp, const FloatRect& tile trRect.move(transparentDC.toShift()); FloatRect movedDstRect = m_data->m_transform.inverse().mapRect(FloatRect(trRect)); FloatSize moved(movedDstRect.location() - destRectIn.location()); - TransformationMatrix transform = m_data->m_transform; + AffineTransform transform = m_data->m_transform; transform.translate(moved.width(), moved.height()); bmp->drawPattern(dc, transform, tileRectIn, patternTransform, phase, op, destRectIn, origSourceSize); diff --git a/WebCore/platform/graphics/wince/ImageBufferWince.cpp b/WebCore/platform/graphics/wince/ImageBufferWince.cpp index 3417f5f..9624e26 100644 --- a/WebCore/platform/graphics/wince/ImageBufferWince.cpp +++ b/WebCore/platform/graphics/wince/ImageBufferWince.cpp @@ -42,7 +42,7 @@ public: virtual void destroyDecodedData(bool destroyAll = true) {} virtual unsigned decodedSize() const { return 0; } virtual void draw(GraphicsContext*, const FloatRect& dstRect, const FloatRect& srcRect, CompositeOperator); - virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const TransformationMatrix& patternTransform, + virtual void drawPattern(GraphicsContext*, const FloatRect& srcRect, const AffineTransform& patternTransform, const FloatPoint& phase, CompositeOperator, const FloatRect& destRect); const ImageBufferData* m_data; @@ -55,7 +55,7 @@ void BufferedImage::draw(GraphicsContext* ctxt, const FloatRect& dstRect, const m_data->m_bitmap->draw(ctxt, intDstRect, intSrcRect, compositeOp); } -void BufferedImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRectIn, const TransformationMatrix& patternTransform, +void BufferedImage::drawPattern(GraphicsContext* ctxt, const FloatRect& tileRectIn, const AffineTransform& patternTransform, const FloatPoint& phase, CompositeOperator op, const FloatRect& destRect) { m_data->m_bitmap->drawPattern(ctxt, tileRectIn, patternTransform, phase, op, destRect, size()); diff --git a/WebCore/platform/graphics/wince/PathWince.cpp b/WebCore/platform/graphics/wince/PathWince.cpp index 7589ccb..00d03b1 100644 --- a/WebCore/platform/graphics/wince/PathWince.cpp +++ b/WebCore/platform/graphics/wince/PathWince.cpp @@ -20,11 +20,11 @@ #include "config.h" #include "Path.h" +#include "AffineTransform.h" #include "FloatRect.h" #include "NotImplemented.h" #include "PlatformPathWince.h" #include "PlatformString.h" -#include "TransformationMatrix.h" #include <wtf/OwnPtr.h> namespace WebCore { @@ -133,7 +133,7 @@ void Path::apply(void* info, PathApplierFunction function) const m_path->apply(info, function); } -void Path::transform(const TransformationMatrix& t) +void Path::transform(const AffineTransform& t) { m_path->transform(t); } diff --git a/WebCore/platform/graphics/wince/PlatformPathWince.cpp b/WebCore/platform/graphics/wince/PlatformPathWince.cpp index 66fad50..cde5461 100644 --- a/WebCore/platform/graphics/wince/PlatformPathWince.cpp +++ b/WebCore/platform/graphics/wince/PlatformPathWince.cpp @@ -20,11 +20,11 @@ #include "config.h" #include "PlatformPathWince.h" +#include "AffineTransform.h" #include "FloatRect.h" #include "GraphicsContext.h" #include "Path.h" #include "PlatformString.h" -#include "TransformationMatrix.h" #include "WinceGraphicsExtras.h" #include <wtf/MathExtras.h> #include <wtf/OwnPtr.h> @@ -232,7 +232,7 @@ static void addArcPoints(PathPolygon& poly, const PlatformPathElement::ArcTo& da poly.append(data.m_end); } -static void drawPolygons(HDC dc, const Vector<PathPolygon>& polygons, bool fill, const TransformationMatrix* transformation) +static void drawPolygons(HDC dc, const Vector<PathPolygon>& polygons, bool fill, const AffineTransform* transformation) { MemoryAllocationCanFail canFail; for (Vector<PathPolygon>::const_iterator i = polygons.begin(); i != polygons.end(); ++i) { @@ -317,7 +317,7 @@ void PathPolygon::move(const FloatSize& offset) i->move(offset); } -void PathPolygon::transform(const TransformationMatrix& t) +void PathPolygon::transform(const AffineTransform& t) { for (Vector<PathPoint>::iterator i = begin(); i < end(); ++i) *i = t.mapPoint(*i); @@ -403,7 +403,7 @@ void PlatformPathElement::move(const FloatSize& offset) m_data.m_points[i].move(offset); } -void PlatformPathElement::transform(const TransformationMatrix& t) +void PlatformPathElement::transform(const AffineTransform& t) { int n = numControlPoints(); for (int i = 0; i < n; ++i) { @@ -571,12 +571,12 @@ void PlatformPath::clear() m_penLifted = true; } -void PlatformPath::strokePath(HDC dc, const TransformationMatrix* transformation) const +void PlatformPath::strokePath(HDC dc, const AffineTransform* transformation) const { drawPolygons(dc, m_subpaths, false, transformation); } -void PlatformPath::fillPath(HDC dc, const TransformationMatrix* transformation) const +void PlatformPath::fillPath(HDC dc, const AffineTransform* transformation) const { HGDIOBJ oldPen = SelectObject(dc, GetStockObject(NULL_PEN)); drawPolygons(dc, m_subpaths, true, transformation); @@ -593,7 +593,7 @@ void PlatformPath::translate(const FloatSize& size) it->move(size); } -void PlatformPath::transform(const TransformationMatrix& t) +void PlatformPath::transform(const AffineTransform& t) { for (PlatformPathElements::iterator it(m_elements.begin()); it != m_elements.end(); ++it) it->transform(t); diff --git a/WebCore/platform/graphics/wince/PlatformPathWince.h b/WebCore/platform/graphics/wince/PlatformPathWince.h index fca00a7..e614cec 100644 --- a/WebCore/platform/graphics/wince/PlatformPathWince.h +++ b/WebCore/platform/graphics/wince/PlatformPathWince.h @@ -51,7 +51,7 @@ namespace WebCore { struct PathPolygon: public Vector<PathPoint> { void move(const FloatSize& offset); - void transform(const TransformationMatrix& t); + void transform(const AffineTransform& t); bool contains(const FloatPoint& point) const; }; @@ -113,7 +113,7 @@ namespace WebCore { int numPoints() const; int numControlPoints() const; void move(const FloatSize& offset); - void transform(const TransformationMatrix& t); + void transform(const AffineTransform& t); PathElementType type() const; PlaformPathElementType platformType() const { return m_type; } void inflateRectToContainMe(FloatRect& r, const FloatPoint& lastPoint) const; @@ -141,14 +141,14 @@ namespace WebCore { void clear(); bool isEmpty() const { return m_elements.isEmpty(); } - void strokePath(HDC, const TransformationMatrix* tr) const; - void fillPath(HDC, const TransformationMatrix* tr) const; + void strokePath(HDC, const AffineTransform* tr) const; + void fillPath(HDC, const AffineTransform* tr) const; FloatPoint lastPoint() const { return m_elements.isEmpty() ? FloatPoint(0, 0) : m_elements.last().lastPoint(); } const FloatRect& boundingRect() const { return m_boundingRect; } bool contains(const FloatPoint& point, WindRule rule) const; void translate(const FloatSize& size); - void transform(const TransformationMatrix& t); + void transform(const AffineTransform& t); void moveTo(const FloatPoint&); void addLineTo(const FloatPoint&); |