summaryrefslogtreecommitdiffstats
path: root/ksvg/plugin/backends
diff options
context:
space:
mode:
Diffstat (limited to 'ksvg/plugin/backends')
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasFactory.h2
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.cpp36
-rw-r--r--ksvg/plugin/backends/agg/AggCanvasItems.h10
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.cpp50
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvas.h2
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasFactory.h2
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.cpp142
-rw-r--r--ksvg/plugin/backends/libart/LibartCanvasItems.h20
8 files changed, 132 insertions, 132 deletions
diff --git a/ksvg/plugin/backends/agg/AggCanvasFactory.h b/ksvg/plugin/backends/agg/AggCanvasFactory.h
index 8e7d4747..92ba5b69 100644
--- a/ksvg/plugin/backends/agg/AggCanvasFactory.h
+++ b/ksvg/plugin/backends/agg/AggCanvasFactory.h
@@ -35,7 +35,7 @@ public:
AggCanvasFactory();
virtual ~AggCanvasFactory();
- virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList());
+ virtual TQObject *createObject(TQObject *tqparent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList());
};
};
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.cpp b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
index be4727ac..36b84e86 100644
--- a/ksvg/plugin/backends/agg/AggCanvasItems.cpp
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.cpp
@@ -239,13 +239,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2)
m_fillPainter->update(m_style);
if(m_strokePainter)
m_strokePainter->update(m_style);
- m_canvas->invalidate(this, false);
+ m_canvas->tqinvalidate(this, false);
}
else if(reason == UPDATE_TRANSFORM)
{
freeSVPs();
init();
- m_canvas->invalidate(this, true);
+ m_canvas->tqinvalidate(this, true);
}
else if(reason == UPDATE_ZOOM)
init();
@@ -257,13 +257,13 @@ void AggShape::update(CanvasItemUpdate reason, int param1, int param2)
else if(reason == UPDATE_LINEWIDTH)
{
init();
- m_canvas->invalidate(this, true);
+ m_canvas->tqinvalidate(this, true);
}
}
-void AggShape::draw(SVGShapeImpl *shape)
+void AggShape::draw(SVGShapeImpl *tqshape)
{
- if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
+ if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender()))
return;
//if(!m_strokeSVP && (!m_fillSVP || !m_style->isFilled()))
@@ -292,14 +292,14 @@ void AggShape::draw(SVGShapeImpl *shape)
m_curved.approximation_scale(pow(m_transform.scale(), 0.75));
if(m_fillPainter)
- m_fillPainter->draw(m_canvas, m_curved_trans, m_style, shape);
+ m_fillPainter->draw(m_canvas, m_curved_trans, m_style, tqshape);
if(m_strokePainter)
- m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, shape);
+ m_strokePainter->draw(m_canvas, m_curved_stroked_trans, m_style, tqshape);
}
-bool AggShape::isVisible(SVGShapeImpl *shape)
+bool AggShape::isVisible(SVGShapeImpl *tqshape)
{
- return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
+ return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->directRender());
}
void AggShape::calcSVPs(const SVGMatrixImpl *matrix)
@@ -376,14 +376,14 @@ void AggStrokePaintServer::update(SVGStylableImpl *style)
}
template<class VertexSource>
-void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
+void AggStrokePaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape)
{
canvas->m_ras.reset();
if(style->getStrokeColor()->paintType() == SVG_PAINTTYPE_URI)
{
- AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getStrokeColor()->uri().string()));
+ AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getStrokeColor()->uri().string()));
if(!pserver) return;
- pserver->setBBoxTarget(shape);
+ pserver->setBBoxTarget(tqshape);
// TODO : Clipping
if(!pserver->finalized())
@@ -425,14 +425,14 @@ void AggFillPaintServer::update(SVGStylableImpl *style)
}
template<class VertexSource>
-void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape)
+void AggFillPaintServer::draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape)
{
canvas->m_ras.reset();
if(style->getFillColor()->paintType() == SVG_PAINTTYPE_URI)
{
- AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), style->getFillColor()->uri().string()));
+ AggPaintServer *pserver = static_cast<AggPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), style->getFillColor()->uri().string()));
if(!pserver) return;
- pserver->setBBoxTarget(shape);
+ pserver->setBBoxTarget(tqshape);
// TODO : Clipping
if(!pserver->finalized())
@@ -1166,13 +1166,13 @@ void AggText::update(CanvasItemUpdate reason, int param1, int param2)
svpelement = ++it;
}
- m_canvas->invalidate(this, false);
+ m_canvas->tqinvalidate(this, false);
}
else if(reason == UPDATE_TRANSFORM)
{
clearCurved();
init();
- m_canvas->invalidate(this, true);
+ m_canvas->tqinvalidate(this, true);
}
else if(reason == UPDATE_ZOOM)
{
@@ -1398,7 +1398,7 @@ void AggGradient::parseGradientStops(SVGGradientElementImpl *gradient)
opacity *= elem->stopOpacity();
// Get rgba color including stop-opacity
- Q_UINT32 rgba = (stopColor << 8) | int(floor(int(opacity * 255.0) + 0.5));
+ TQ_UINT32 rgba = (stopColor << 8) | int(floor(int(opacity * 255.0) + 0.5));
// Convert from separated to premultiplied alpha
a = rgba & 0xff;
diff --git a/ksvg/plugin/backends/agg/AggCanvasItems.h b/ksvg/plugin/backends/agg/AggCanvasItems.h
index b5599952..7612b234 100644
--- a/ksvg/plugin/backends/agg/AggCanvasItems.h
+++ b/ksvg/plugin/backends/agg/AggCanvasItems.h
@@ -270,7 +270,7 @@ namespace KSVG
AggFillPaintServer(SVGStylableImpl *style);
void update(SVGStylableImpl *style);
template<class VertexSource>
- void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
+ void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape);
private:
agg::rgba8 m_color;
@@ -282,7 +282,7 @@ namespace KSVG
AggStrokePaintServer(SVGStylableImpl *style);
void update(SVGStylableImpl *style);
template<class VertexSource>
- void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *shape);
+ void draw(AggCanvas *canvas, VertexSource &vs, SVGStylableImpl *style, SVGShapeImpl *tqshape);
private:
agg::rgba8 m_color;
@@ -311,11 +311,11 @@ 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 *shape);
+ void draw(SVGShapeImpl *tqshape);
void calcSVPs(const SVGMatrixImpl *matrix);
virtual void init();
virtual void init(const SVGMatrixImpl *);
- bool isVisible(SVGShapeImpl *shape);
+ bool isVisible(SVGShapeImpl *tqshape);
void setRenderContext(RenderContext context) { m_context = context; }
@@ -327,7 +327,7 @@ namespace KSVG
RenderContext m_context;
AggCanvas *m_canvas;
- QRect m_bbox;
+ TQRect m_bbox;
AggFillPaintServer *m_fillPainter;
AggStrokePaintServer *m_strokePainter;
};
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.cpp b/ksvg/plugin/backends/libart/LibartCanvas.cpp
index 55b371dd..05f37e82 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 *shape = dynamic_cast<SVGShapeImpl *>(style);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(style);
- if(shape)
+ if(tqshape)
{
if(image.depth() != 32)
image = image.convertDepth(32);
ArtSVP *imageBorder = svpFromPolygon(clippingPolygon);
- ArtSVP *clipSvp = clipSingleSVP(imageBorder, shape);
+ ArtSVP *clipSvp = clipSingleSVP(imageBorder, tqshape);
ArtDRect bbox;
art_drect_svp(&bbox, clipSvp);
@@ -214,12 +214,12 @@ void LibartCanvas::drawImage(TQImage image, SVGStylableImpl *style, const SVGMat
TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
- TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+ TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox);
double affine[6];
KSVGHelper::matrixToAffine(matrix, affine);
- ksvg_art_rgb_affine_clip(clipSvp, m_buffer + x0 * nrChannels() + y0 * rowStride(), x0, y0, x1 + 1, y1 + 1, rowStride(), nrChannels(), image.bits(), image.width(), image.height(), image.width() * 4, affine, int(style->getOpacity() * 255), (const art_u8 *)mask.data());
+ ksvg_art_rgb_affine_clip(clipSvp, m_buffer + x0 * nrChannels() + y0 * rowStride(), x0, y0, x1 + 1, y1 + 1, rowStride(), nrChannels(), image.bits(), image.width(), image.height(), image.width() * 4, affine, int(style->getOpacity() * 255), (const art_u8 *)tqmask.data());
}
art_svp_free(imageBorder);
@@ -266,10 +266,10 @@ ArtSVP *LibartCanvas::clippingRect(const TQRect &rect, const SVGMatrixImpl *ctm)
return result;
}
-ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
+ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *tqshape)
{
ArtSVP *clippedSvp = copy_svp(svp);
- SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(shape);
+ SVGStylableImpl *style = dynamic_cast<SVGStylableImpl *>(tqshape);
if(style)
{
@@ -282,7 +282,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
if(clipPath)
{
LibartClipPath *lclip = dynamic_cast<LibartClipPath *>(clipPath);
- reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(shape);
+ reinterpret_cast<SVGClipPathElementImpl *>(clipPath->element())->setBBoxTarget(tqshape);
lclip->init();
@@ -296,7 +296,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
}
}
- SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(shape);
+ SVGSVGElementImpl *svg = dynamic_cast<SVGSVGElementImpl *>(tqshape);
// 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 *shape)
clippedSvp = s;
}
- if(dynamic_cast<SVGPatternElementImpl *>(shape) != 0)
+ if(dynamic_cast<SVGPatternElementImpl *>(tqshape) != 0)
{
// TODO: inherit clipping paths into tile space
}
- else if(dynamic_cast<SVGMarkerElementImpl *>(shape) != 0)
+ else if(dynamic_cast<SVGMarkerElementImpl *>(tqshape) != 0)
{
- SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(shape);
+ SVGMarkerElementImpl *marker = static_cast<SVGMarkerElementImpl *>(tqshape);
if(!marker->clipShape().isEmpty())
{
@@ -329,23 +329,23 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
}
else
{
- SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(shape);
- DOM::Node parentNode = element->parentNode();
+ SVGElementImpl *element = dynamic_cast<SVGElementImpl *>(tqshape);
+ DOM::Node tqparentNode = element->parentNode();
- if(!parentNode.isNull())
+ if(!tqparentNode.isNull())
{
- SVGElementImpl *parent = element->ownerDoc()->getElementFromHandle(parentNode.handle());
+ SVGElementImpl *tqparent = element->ownerDoc()->getElementFromHandle(tqparentNode.handle());
- if(parent)
+ if(tqparent)
{
- SVGShapeImpl *parentShape = dynamic_cast<SVGShapeImpl *>(parent);
+ SVGShapeImpl *tqparentShape = dynamic_cast<SVGShapeImpl *>(tqparent);
- if(parentShape)
+ if(tqparentShape)
{
// Clip against ancestor clipping paths
- ArtSVP *parentClippedSvp = clipSingleSVP(clippedSvp, parentShape);
+ ArtSVP *tqparentClippedSvp = clipSingleSVP(clippedSvp, tqparentShape);
art_svp_free(clippedSvp);
- clippedSvp = parentClippedSvp;
+ clippedSvp = tqparentClippedSvp;
}
}
}
@@ -354,7 +354,7 @@ ArtSVP *LibartCanvas::clipSingleSVP(ArtSVP *svp, SVGShapeImpl *shape)
return clippedSvp;
}
-void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox)
+void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray tqmask, TQRect screenBBox)
{
int x0 = screenBBox.left();
int y0 = screenBBox.top();
@@ -363,13 +363,13 @@ void LibartCanvas::drawSVP(ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect
if(m_nrChannels == 3)
{
- if(mask.data())
- art_ksvg_rgb_svp_alpha_mask(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0, (art_u8 *)mask.data());
+ if(tqmask.data())
+ art_ksvg_rgb_svp_alpha_tqmask(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0, (art_u8 *)tqmask.data());
else
art_rgb_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 3 + y0 * 3 * m_width, m_width * 3, 0);
}
else
- art_ksvg_rgba_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 4 + y0 * 4 * m_width, m_width * 4, 0, (art_u8 *)mask.data());
+ art_ksvg_rgba_svp_alpha(svp, x0, y0, x1 + 1, y1 + 1, color, m_buffer + x0 * 4 + y0 * 4 * m_width, m_width * 4, 0, (art_u8 *)tqmask.data());
}
ArtSVP *LibartCanvas::copy_svp(const ArtSVP *svp)
diff --git a/ksvg/plugin/backends/libart/LibartCanvas.h b/ksvg/plugin/backends/libart/LibartCanvas.h
index 9232789a..ff3829bd 100644
--- a/ksvg/plugin/backends/libart/LibartCanvas.h
+++ b/ksvg/plugin/backends/libart/LibartCanvas.h
@@ -50,7 +50,7 @@ class LibartCanvas : public KSVGCanvas
public:
LibartCanvas(unsigned int width, unsigned int height);
- void drawSVP(_ArtSVP *svp, art_u32 color, TQByteArray mask, TQRect screenBBox);
+ void drawSVP(_ArtSVP *svp, art_u32 color, TQByteArray tqmask, TQRect screenBBox);
void drawImage(TQImage image, SVGStylableImpl *style, const SVGMatrixImpl *matrix, const KSVGPolygon& clippingPolygon);
virtual T2P::BezierPath *toBezierPath(CanvasItem *item) const;
diff --git a/ksvg/plugin/backends/libart/LibartCanvasFactory.h b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
index 58ad5047..0e5e3bed 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasFactory.h
+++ b/ksvg/plugin/backends/libart/LibartCanvasFactory.h
@@ -35,7 +35,7 @@ public:
LibartCanvasFactory();
virtual ~LibartCanvasFactory();
- virtual TQObject *createObject(TQObject *parent = 0, const char *pname = 0, const char *name = "TQObject", const TQStringList &args = TQStringList());
+ virtual TQObject *createObject(TQObject *tqparent = 0, const char *pname = 0, const char *name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList());
};
}
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.cpp b/ksvg/plugin/backends/libart/LibartCanvasItems.cpp
index 998fb51f..32dad452 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 *shape)
+bool LibartShape::isVisible(SVGShapeImpl *tqshape)
{
- return m_referenced || (m_style->getVisible() && m_style->getDisplay() && shape->directRender());
+ return m_referenced || (m_style->getVisible() && m_style->getDisplay() && tqshape->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->invalidate(this, false);
+ m_canvas->tqinvalidate(this, false);
}
else if(reason == UPDATE_TRANSFORM)
{
reset();
- m_canvas->invalidate(this, true);
+ m_canvas->tqinvalidate(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->invalidate(this, true);
+ m_canvas->tqinvalidate(this, true);
}
}
-void LibartShape::draw(SVGShapeImpl *shape)
+void LibartShape::draw(SVGShapeImpl *tqshape)
{
- if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !shape->directRender()))
+ if(!m_referenced && (!m_style->getVisible() || !m_style->getDisplay() || !tqshape->directRender()))
return;
bool fillOk = m_fillSVP && m_style->isFilled();
@@ -199,10 +199,10 @@ void LibartShape::draw(SVGShapeImpl *shape)
if(fillOk || strokeOk)
{
if(m_fillPainter && m_fillSVP)
- m_fillPainter->draw(m_canvas, m_fillSVP, m_style, shape);
+ m_fillPainter->draw(m_canvas, m_fillSVP, m_style, tqshape);
if(m_strokePainter && m_strokeSVP)
- m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, shape);
+ m_strokePainter->draw(m_canvas, m_strokeSVP, m_style, tqshape);
}
}
@@ -230,9 +230,9 @@ void LibartPainter::update(SVGStylableImpl *style)
}
}
-void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape)
+void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape)
{
- ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, shape);
+ ArtSVP *clippedSvp = canvas->clipSingleSVP(svp, tqshape);
// Clipping
ArtDRect bbox;
@@ -252,22 +252,22 @@ void LibartPainter::draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *st
TQRect screenBBox(x0, y0, x1 - x0 + 1, y1 - y0 + 1);
- TQByteArray mask = SVGMaskElementImpl::maskRectangle(shape, screenBBox);
+ TQByteArray tqmask = SVGMaskElementImpl::tqmaskRectangle(tqshape, screenBBox);
if(paintType(style) == SVG_PAINTTYPE_URI)
{
- LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(shape->ownerDoc(), paintUri(style)));
+ LibartPaintServer *pserver = static_cast<LibartPaintServer *>(SVGPaintServerImpl::paintServer(tqshape->ownerDoc(), paintUri(style)));
if(pserver)
{
- pserver->setBBoxTarget(shape);
+ pserver->setBBoxTarget(tqshape);
if(!pserver->finalized())
pserver->finalizePaintServer();
- pserver->render(canvas, clippedSvp, opacity(style), mask, screenBBox);
+ pserver->render(canvas, clippedSvp, opacity(style), tqmask, screenBBox);
}
}
else
- canvas->drawSVP(clippedSvp, m_color, mask, screenBBox);
+ canvas->drawSVP(clippedSvp, m_color, tqmask, screenBBox);
}
art_svp_free(clippedSvp);
@@ -1064,29 +1064,29 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM)
double cury = m_array[index - 1].y3;
// Find last subpath
- int find = -1;
+ int tqfind = -1;
for(int i = index - 1; i >= 0; i--)
{
if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
{
- find = i;
+ tqfind = i;
break;
}
}
// Fix a problem where the .svg file used floats as values... (sofico.svg)
- if(curx != m_array[find].x3 && cury != m_array[find].y3)
+ if(curx != m_array[tqfind].x3 && cury != m_array[tqfind].y3)
{
- if((int) curx == (int) m_array[find].x3 && (int) cury == (int) m_array[find].y3)
+ if((int) curx == (int) m_array[tqfind].x3 && (int) cury == (int) m_array[tqfind].y3)
{
ensureSpace(m_array, index)
m_array[index].code = ART_LINETO;
- m_array[index].x3 = m_array[find].x3;
- m_array[index].y3 = m_array[find].y3;
+ m_array[index].x3 = m_array[tqfind].x3;
+ m_array[index].y3 = m_array[tqfind].y3;
- curx = m_array[find].x3;
- cury = m_array[find].y3;
+ curx = m_array[tqfind].x3;
+ cury = m_array[tqfind].y3;
index++;
}
@@ -1095,16 +1095,16 @@ void LibartPath::init(const SVGMatrixImpl *screenCTM)
// handle filled paths that are not closed explicitly
if(m_path->getFillColor()->paintType() != SVG_PAINTTYPE_NONE)
{
- if((int) curx != (int) m_array[find].x3 || (int) cury != (int) m_array[find].y3)
+ if((int) curx != (int) m_array[tqfind].x3 || (int) cury != (int) m_array[tqfind].y3)
{
ensureSpace(m_array, index)
m_array[index].code = (ArtPathcode)ART_END2;
- m_array[index].x3 = m_array[find].x3;
- m_array[index].y3 = m_array[find].y3;
+ m_array[index].x3 = m_array[tqfind].x3;
+ m_array[index].y3 = m_array[tqfind].y3;
- curx = m_array[find].x3;
- cury = m_array[find].y3;
+ curx = m_array[tqfind].x3;
+ cury = m_array[tqfind].y3;
index++;
}
@@ -1147,12 +1147,12 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool)
if(index > 0 && !closed)
{
// Find last subpath
- int find = -1;
+ int tqfind = -1;
for(int i = index - 1; i >= 0; i--)
{
if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
{
- find = i;
+ tqfind = i;
break;
}
}
@@ -1160,8 +1160,8 @@ void LibartPath::svgMoveTo(double x1, double y1, bool closed, bool)
ensureSpace(m_array, index)
m_array[index].code = (ArtPathcode) ART_END2;
- m_array[index].x3 = m_array[find].x3;
- m_array[index].y3 = m_array[find].y3;
+ m_array[index].x3 = m_array[tqfind].x3;
+ m_array[index].y3 = m_array[tqfind].y3;
index++;
}
@@ -1205,25 +1205,25 @@ void LibartPath::svgClosePath()
double curx = m_array[index - 1].x3;
double cury = m_array[index - 1].y3;
- int find = -1;
+ int tqfind = -1;
for(int i = index - 1; i >= 0; i--)
{
if(m_array[i].code == ART_MOVETO_OPEN || m_array[i].code == ART_MOVETO)
{
- find = i;
+ tqfind = i;
break;
}
}
- if(find != -1)
+ if(tqfind != -1)
{
- if(m_array[find].x3 != curx || m_array[find].y3 != cury)
+ if(m_array[tqfind].x3 != curx || m_array[tqfind].y3 != cury)
{
ensureSpace(m_array, index)
m_array[index].code = ART_LINETO;
- m_array[index].x3 = m_array[find].x3;
- m_array[index].y3 = m_array[find].y3;
+ m_array[index].x3 = m_array[tqfind].x3;
+ m_array[index].y3 = m_array[tqfind].y3;
}
}
}
@@ -1285,28 +1285,28 @@ void LibartClipPath::init()
for(; !node.isNull(); node = node.nextSibling())
{
SVGElementImpl *element = m_clipPath->ownerDoc()->getElementFromHandle(node.handle());
- SVGShapeImpl *shape = dynamic_cast<SVGShapeImpl *>(element);
+ SVGShapeImpl *tqshape = dynamic_cast<SVGShapeImpl *>(element);
SVGTestsImpl *tests = dynamic_cast<SVGTestsImpl *>(element);
bool ok = tests ? tests->ok() : true;
- if(element && shape && ok && !shape->isContainer())
+ if(element && tqshape && ok && !tqshape->isContainer())
{
- LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(shape->item());
+ LibartClipItem *clipElement = dynamic_cast<LibartClipItem *>(tqshape->item());
- if(dynamic_cast<LibartText *>(shape->item()))
+ if(dynamic_cast<LibartText *>(tqshape->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<LibartText *>(shape->item());
+ clipElement = dynamic_cast<LibartText *>(tqshape->item());
}
if(clipElement)
{
clipElement->setRenderContext(CLIPPING);
- // Push coordinate system down to children.
- SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(shape);
+ // Push coordinate system down to tqchildren.
+ SVGLocatableImpl *locatable = dynamic_cast<SVGLocatableImpl *>(tqshape);
if(locatable)
locatable->updateCachedScreenCTM(clipMatrix);
@@ -1505,22 +1505,22 @@ void LibartText::update(CanvasItemUpdate reason, int param1, int param2)
bool strokeOk = stroke && stroke->svp && text->isStroked() && text->getStrokeWidth()->baseVal()->value() > 0; // Spec: A zero value causes no stroke to be painted.
if(fillOk || strokeOk)
{
- if(m_fillPainters.find(text))
+ if(m_fillPainters.tqfind(text))
m_fillPainters[text]->update(text);
- if(m_strokePainters.find(text))
+ if(m_strokePainters.tqfind(text))
m_strokePainters[text]->update(text);
}
fill = ++it1;
stroke = ++it2;
}
- m_canvas->invalidate(this, false);
+ m_canvas->tqinvalidate(this, false);
}
else if(reason == UPDATE_TRANSFORM)
{
clearSVPs();
init();
- m_canvas->invalidate(this, true);
+ m_canvas->tqinvalidate(this, true);
}
else if(reason == UPDATE_ZOOM)
{
@@ -1574,10 +1574,10 @@ void LibartText::draw()
if(fillOk || strokeOk)
{
- if(fillOk && m_fillPainters.find(text))
+ if(fillOk && m_fillPainters.tqfind(text))
m_fillPainters[text]->draw(m_canvas, fill->svp, text, text);
- if(strokeOk && m_strokePainters.find(text))
+ if(strokeOk && m_strokePainters.tqfind(text))
m_strokePainters[text]->draw(m_canvas, stroke->svp, text, text);
}
fill = ++it1;
@@ -1655,11 +1655,11 @@ void LibartText::renderCallback(SVGTextContentElementImpl *element, const SVGMat
m_drawFillItems.append(fillElement);
m_drawStrokeItems.append(strokeElement);
- if(!m_fillPainters.find(element) && element->isFilled())
+ if(!m_fillPainters.tqfind(element) && element->isFilled())
m_fillPainters.insert(element, new LibartFillPainter(element));
// Spec: A zero value causes no stroke to be painted.
- if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
m_strokePainters.insert(element, new LibartStrokePainter(element));
}
}
@@ -1734,7 +1734,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x,
m_drawFillItems.append(fillElement);
- if(!m_fillPainters.find(element) && element->isFilled())
+ if(!m_fillPainters.tqfind(element) && element->isFilled())
m_fillPainters.insert(element, new LibartFillPainter(element));
art_svp_free(temp);
@@ -1752,7 +1752,7 @@ void LibartText::addTextDecoration(SVGTextContentElementImpl *element, double x,
m_drawStrokeItems.append(strokeElement);
// Spec: A zero value causes no stroke to be painted.
- if(!m_strokePainters.find(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
+ if(!m_strokePainters.tqfind(element) && element->isStroked() && element->getStrokeWidth()->baseVal()->value() > 0)
m_strokePainters.insert(element, new LibartStrokePainter(element));
}
art_free(vec);
@@ -1799,10 +1799,10 @@ ArtRender *LibartPaintServer::createRenderer(TQRect bbox, KSVGCanvas *c)
// Note: We always pass 3 for the number of channels since the ART_ALPHA parameter
// adds the alpha channel when present.
ArtRender *render = 0;
- render = art_render_new(QMIN(x0, x1),
- QMIN(y0, y1),
- QMAX(x0, x1) + 1,
- QMAX(y0, y1) + 1,
+ render = art_render_new(TQMIN(x0, x1),
+ TQMIN(y0, y1),
+ TQMAX(x0, x1) + 1,
+ TQMAX(y0, y1) + 1,
c->renderingBuffer() + x0 * c->nrChannels() + y0 * c->rowStride(),
c->rowStride(), 3, 8,
c->nrChannels() == 3 ? ART_ALPHA_NONE : ART_ALPHA_PREMUL, 0);
@@ -1868,8 +1868,8 @@ void LibartGradient::parseGradientStops(SVGGradientElementImpl *gradient)
float opacity = elem->stopOpacity();
// Get rgba color including stop-opacity
- Q_UINT32 rgba = (stopColor << 8) | int(opacity * 255.0 + 0.5);
- Q_UINT32 r, g, b, a;
+ TQ_UINT32 rgba = (stopColor << 8) | int(opacity * 255.0 + 0.5);
+ TQ_UINT32 r, g, b, a;
a = rgba & 0xff;
r = (rgba >> 24) & 0xff;
@@ -1899,7 +1899,7 @@ void LibartGradient::reference(const TQString &)
{
}
-void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
+void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox)
{
if(!m_stops.isEmpty())
{
@@ -2022,9 +2022,9 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB
art_render_svp(render, svp);
art_ksvg_render_gradient_linear(render, linear, ART_FILTER_HYPER);
- if(mask.data())
+ if(tqmask.data())
art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1,
- (const art_u8 *)mask.data(), screenBBox.width());
+ (const art_u8 *)tqmask.data(), screenBBox.width());
art_render_invoke(render);
@@ -2032,7 +2032,7 @@ void LibartLinearGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB
}
}
-void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
+void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox)
{
if(!m_stops.isEmpty())
{
@@ -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 shape due to the non-uniform scaling.
+ // It also produces the elliptical tqshape due to the non-uniform scaling.
SVGRectImpl *userBBox = getBBoxTarget()->getBBox();
double width = userBBox->width();
@@ -2158,9 +2158,9 @@ void LibartRadialGradient::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQB
art_render_svp(render, svp);
art_ksvg_render_gradient_radial(render, radial, ART_FILTER_HYPER);
- if(mask.data())
+ if(tqmask.data())
art_render_mask(render, screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1,
- (const art_u8 *)mask.data(), screenBBox.width());
+ (const art_u8 *)tqmask.data(), screenBBox.width());
art_render_invoke(render);
@@ -2184,7 +2184,7 @@ void LibartPattern::reference(const TQString &href)
m_pattern->reference(href);
}
-void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox)
+void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox)
{
SVGPatternElementImpl::Tile tile = m_pattern->createTile(getBBoxTarget());
@@ -2202,7 +2202,7 @@ void LibartPattern::render(KSVGCanvas *c, ArtSVP *svp, float opacity, TQByteArra
int alpha = int(opacity * 255 + 0.5);
- ksvg_art_rgb_texture(svp, c->renderingBuffer() + screenBBox.x() * c->nrChannels() + screenBBox.y() * c->rowStride(), screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, c->rowStride(), c->nrChannels(), tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4, affine, ART_FILTER_NEAREST, 0L, alpha, (art_u8 *)mask.data());
+ ksvg_art_rgb_texture(svp, c->renderingBuffer() + screenBBox.x() * c->nrChannels() + screenBBox.y() * c->rowStride(), screenBBox.left(), screenBBox.top(), screenBBox.right() + 1, screenBBox.bottom() + 1, c->rowStride(), c->nrChannels(), tile.image().bits(), tile.image().width(), tile.image().height(), tile.image().width() * 4, affine, ART_FILTER_NEAREST, 0L, alpha, (art_u8 *)tqmask.data());
}
}
diff --git a/ksvg/plugin/backends/libart/LibartCanvasItems.h b/ksvg/plugin/backends/libart/LibartCanvasItems.h
index d34ec9f4..bf18dbd0 100644
--- a/ksvg/plugin/backends/libart/LibartCanvasItems.h
+++ b/ksvg/plugin/backends/libart/LibartCanvasItems.h
@@ -73,7 +73,7 @@ namespace KSVG
LibartPaintServer() : CanvasPaintServer() {}
virtual ~LibartPaintServer() {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox) = 0;
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox) = 0;
_ArtRender *createRenderer(TQRect rect, KSVGCanvas *c);
};
@@ -99,7 +99,7 @@ namespace KSVG
public:
LibartLinearGradient(SVGLinearGradientElementImpl *linear) : LibartGradient(linear), m_linear(linear) {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox);
protected:
SVGLinearGradientElementImpl *m_linear;
@@ -110,7 +110,7 @@ namespace KSVG
public:
LibartRadialGradient(SVGRadialGradientElementImpl *radial) : LibartGradient(radial), m_radial(radial) {}
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox);
protected:
SVGRadialGradientElementImpl *m_radial;
@@ -125,7 +125,7 @@ namespace KSVG
virtual void finalizePaintServer();
virtual void reference(const TQString &href);
- virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray mask, TQRect screenBBox);
+ virtual void render(KSVGCanvas *c, _ArtSVP *svp, float opacity, TQByteArray tqmask, TQRect screenBBox);
protected:
SVGPatternElementImpl *m_pattern;
@@ -138,12 +138,12 @@ namespace KSVG
virtual ~LibartPainter() {}
void update(SVGStylableImpl *style);
- void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *shape);
+ void draw(LibartCanvas *canvas, _ArtSVP *svp, SVGStylableImpl *style, SVGShapeImpl *tqshape);
virtual float opacity(SVGStylableImpl *style) const = 0;
virtual unsigned short paintType(SVGStylableImpl *style) const = 0;
virtual TQString paintUri(SVGStylableImpl *style) const = 0;
- virtual QRgb color(SVGStylableImpl *style) const = 0;
+ virtual TQRgb color(SVGStylableImpl *style) const = 0;
protected:
art_u32 m_color;
@@ -157,7 +157,7 @@ namespace KSVG
float opacity(SVGStylableImpl *style) const { return style->getFillOpacity() * style->getOpacity(); }
unsigned short paintType(SVGStylableImpl *style) const { return style->getFillColor()->paintType(); }
TQString paintUri(SVGStylableImpl *style) const { return style->getFillColor()->uri().string(); }
- QRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); }
+ TQRgb color(SVGStylableImpl *style) const { return style->getFillColor()->rgbColor().color(); }
};
class LibartStrokePainter : public LibartPainter
@@ -168,7 +168,7 @@ namespace KSVG
float opacity(SVGStylableImpl *style) const { return style->getStrokeOpacity() * style->getOpacity(); }
unsigned short paintType(SVGStylableImpl *style) const { return style->getStrokeColor()->paintType(); }
TQString paintUri(SVGStylableImpl *style) const { return style->getStrokeColor()->uri().string(); }
- QRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); }
+ TQRgb color(SVGStylableImpl *style) const { return style->getStrokeColor()->rgbColor().color(); }
};
class LibartClipItem
@@ -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 *shape);
- bool isVisible(SVGShapeImpl *shape);
+ void draw(SVGShapeImpl *tqshape);
+ bool isVisible(SVGShapeImpl *tqshape);
virtual void init();
virtual void init(const SVGMatrixImpl *);