From 74c05bbf9d92e43a6cf3799355b5f3598884409e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Mon, 19 Dec 2011 11:56:05 -0600 Subject: Remove additional unneeded tq method conversions --- ksvg/plugin/backends/libart/LibartCanvas.cpp | 24 ++++++------ ksvg/plugin/backends/libart/LibartCanvasItems.cpp | 48 +++++++++++------------ ksvg/plugin/backends/libart/LibartCanvasItems.h | 6 +-- 3 files changed, 39 insertions(+), 39 deletions(-) (limited to 'ksvg/plugin/backends/libart') diff --git a/ksvg/plugin/backends/libart/LibartCanvas.cpp b/ksvg/plugin/backends/libart/LibartCanvas.cpp index 1d2ee30c..55b371dd 100644 --- a/ksvg/plugin/backends/libart/LibartCanvas.cpp +++ b/ksvg/plugin/backends/libart/LibartCanvas.cpp @@ -187,15 +187,15 @@ CanvasPaintServer *LibartCanvas::createPaintServer(SVGElementImpl *pserver) void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon) { - SVGShapeImpl *tqshape = dynamic_cast(style); + SVGShapeImpl *shape = dynamic_cast(style); - if(tqshape) + if(shape) { if(image.depth() != 32) image = image.convertDepth(32); ArtSVP *imageBorder = svpFromPolygon(clippingPolygon); - ArtSVP *clipSvp = clipSingleSVP(imageBorder, tqshape); + ArtSVP *clipSvp = clipSingleSVP(imageBorder, shape); ArtDRect bbox; art_drect_svp(&bbox, clipSvp); @@ -214,7 +214,7 @@ void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMat TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); - TQByteArray mask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox); + TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox); double affine[6]; KSVGHelper::matrixToAffine(matrix, affine); @@ -266,10 +266,10 @@ ArtSVP *LibartCanvas::clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm) return result; } -ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) +ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape) { ArtSVP *clippedSvp = copy_svp(svp); - SVGStylableImpl *style = dynamic_cast(tqshape); + SVGStylableImpl *style = dynamic_cast(shape); if(style) { @@ -282,7 +282,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) if(clipPath) { LibartClipPath *lclip = dynamic_cast(clipPath); - reinterpret_cast(clipPath->element())->setBBoxTarget(tqshape); + reinterpret_cast(clipPath->element())->setBBoxTarget(shape); lclip->init(); @@ -296,7 +296,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) } } - SVGSVGElementImpl *svg = dynamic_cast(tqshape); + SVGSVGElementImpl *svg = dynamic_cast(shape); // Clip outer svg, unless width and height not set if(svg && (!svg->isRootElement() || !svg->getAttribute("width").isEmpty() || !svg->getAttribute("height").isEmpty()) && !svg->getOverflow()) @@ -308,13 +308,13 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) clippedSvp = s; } - if(dynamic_cast(tqshape) != 0) + if(dynamic_cast(shape) != 0) { // TODO: inherit clipping paths into tile space } - else if(dynamic_cast(tqshape) != 0) + else if(dynamic_cast(shape) != 0) { - SVGMarkerElementImpl *marker = static_cast(tqshape); + SVGMarkerElementImpl *marker = static_cast(shape); if(!marker->clipShape().isEmpty()) { @@ -329,7 +329,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape) } else { - SVGElementImpl *element = dynamic_cast(tqshape); + SVGElementImpl *element = dynamic_cast(shape); DOM::Node parentNode = element->parentNode(); if(!parentNode.isNull()) diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp index 1434931b..aca4c517 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp +++ b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp @@ -129,9 +129,9 @@ TQRect LibartShape::bbox() const return rect; } -bool LibartShape::isVisible(SVGShapeImpl *tqshape) +bool LibartShape::isVisible(SVGShapeImpl *shape) { - return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender()); + return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender()); } bool LibartShape::fillContains(const TQPoint &p) @@ -160,12 +160,12 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2) m_fillPainter->update(m_style); if(m_strokePainter) m_strokePainter->update(m_style); - m_canvas->tqinvalidate(this, false); + m_canvas->invalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { reset(); - m_canvas->tqinvalidate(this, true); + m_canvas->invalidate(this, true); } else if(reason == UPDATE_ZOOM) reset(); @@ -184,13 +184,13 @@ void LibartShape::update(CanvasItemUpdate reason, int param1, int param2) m_strokeSVP = 0; } init(); - m_canvas->tqinvalidate(this, true); + m_canvas->invalidate(this, true); } } -void LibartShape::draw(SVGShapeImpl *tqshape) +void LibartShape::draw(SVGShapeImpl *shape) { - if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender())) + if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender())) return; bool fillOk = m_fillSVP && m_style->isFilled(); @@ -199,10 +199,10 @@ void LibartShape::draw(SVGShapeImpl *tqshape) if(fillOk || strokeOk) { if(m_fillPainter && m_fillSVP) - m_fillPainter->draw(m_canvas, m_fillSVP, m_style, tqshape); + m_fillPainter->draw(m_canvas, m_fillSVP, m_style, shape); if(m_strokePainter && m_strokeSVP) - m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, tqshape); + m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, shape); } } @@ -230,9 +230,9 @@ void LibartPainter::update(SVGStylableImpl *style) } } -void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape) +void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape) { - ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, tqshape); + ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, shape); // Clipping ArtDRect bbox; @@ -252,15 +252,15 @@ void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *st TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1); - TQByteArray mask = SVGMaskElementImpl::maskRectangle(tqshape, screenBBox); + TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox); if(paintType(style) == SVG_PAINTTYPE_URI) { - LibartPaintServer *pserver = static_cast(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), paintUri(style))); + LibartPaintServer *pserver = static_cast(SVGPaintServerImpl::paintServer(shape->ownerDoc(), paintUri(style))); if(pserver) { - pserver->setBBoxTarget(tqshape); + pserver->setBBoxTarget(shape); if(!pserver->finalized()) pserver->finalizePaintServer(); pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox); @@ -1285,28 +1285,28 @@ void LibartClipPath::init() for(; !node.isNull(); node = node.nextSibling()) { SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle()); - SVGShapeImpl *tqshape = dynamic_cast(element); + SVGShapeImpl *shape = dynamic_cast(element); SVGTestsImpl *tests = dynamic_cast(element); bool ok = tests ? tests->ok() : true; - if(element && tqshape && ok && !tqshape->isContainer()) + if(element && shape && ok && !shape->isContainer()) { - LibartClipItem *clipElement = dynamic_cast(tqshape->item()); + LibartClipItem *clipElement = dynamic_cast(shape->item()); - if(dynamic_cast(tqshape->item())) + if(dynamic_cast(shape->item())) { // The cast to a clipElement above is failing when it is valid. But only // in the plugin - svgdisplay works fine. What's going on? (Adrian) - clipElement = dynamic_cast(tqshape->item()); + clipElement = dynamic_cast(shape->item()); } if(clipElement) { clipElement->setRenderContext(CLIPPING); - // Push coordinate system down to tqchildren. - SVGLocatableImpl *locatable = dynamic_cast(tqshape); + // Push coordinate system down to children. + SVGLocatableImpl *locatable = dynamic_cast(shape); if(locatable) locatable->updateCachedScreenCTM(clipMatrix); @@ -1514,13 +1514,13 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2) fill = ++it1; stroke = ++it2; } - m_canvas->tqinvalidate(this, false); + m_canvas->invalidate(this, false); } else if(reason == UPDATE_TRANSFORM) { clearSVPs(); init(); - m_canvas->tqinvalidate(this, true); + m_canvas->invalidate(this, true); } else if(reason == UPDATE_ZOOM) { @@ -2085,7 +2085,7 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB // Here we're undoing the unit-converter's work because putting the // bounding box transform into the matrix here lets the gradient transform // sit at the right point in the chain to work with bounding box coordinates. - // It also produces the elliptical tqshape due to the non-uniform scaling. + // It also produces the elliptical shape due to the non-uniform scaling. SVGRectImpl *userBBox = getBBoxTarget()->getBBox(); double width = userBBox->width(); diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.h b/ksvg/plugin/backends/libart/LibartCanvasItems.h index b5b9984b..1e750144 100644 --- a/ksvg/plugin/backends/libart/LibartCanvasItems.h +++ b/ksvg/plugin/backends/libart/LibartCanvasItems.h @@ -138,7 +138,7 @@ namespace KSVG virtual ~LibartPainter() {} void update(SVGStylableImpl *style); - void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape); + void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape); virtual float opacity(SVGStylableImpl *style) const = 0; virtual unsigned short paintType(SVGStylableImpl *style) const = 0; @@ -195,8 +195,8 @@ namespace KSVG virtual bool fillContains(const TQPoint &p); virtual bool strokeContains(const TQPoint &p); virtual void update(CanvasItemUpdate reason, int param1 = 0, int param2 = 0); - void draw(SVGShapeImpl *tqshape); - bool isVisible(SVGShapeImpl *tqshape); + void draw(SVGShapeImpl *shape); + bool isVisible(SVGShapeImpl *shape); virtual void init(); virtual void init(const SVGMatrixImpl *); -- cgit v1.2.1