MCPcopy Index your code
hub / github.com/MapServer/MapServer / renderLine

Method renderLine

mapkmlrenderer.cpp:626–663  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

624}
625
626void KmlRenderer::renderLine(imageObj*, shapeObj *p, strokeStyleObj *style)
627{
628 if (p->numlines == 0)
629 return;
630
631 if (PlacemarkNode == NULL)
632 PlacemarkNode = createPlacemarkNode(LayerNode, NULL);
633
634 if (!PlacemarkNode)
635 return;
636
637 addLineStyleToList(style);
638 SymbologyFlag[Line] = 1;
639
640 /*p->index > CurrentDrawnShapeIndexneed to be reviewd. Added since the hight
641 level code caches shapes when rendering lines*/
642 if (CurrentDrawnShapeIndex == -1 || p->index > CurrentDrawnShapeIndex)
643 {
644 xmlNodePtr geomNode = getGeomParentNode("LineString");
645 addAddRenderingSpecifications(geomNode);
646 addCoordsNode(geomNode, p->line[0].point, p->line[0].numpoints);
647
648 /* more than one line => MultiGeometry*/
649 if (p->numlines > 1)
650 {
651 geomNode = getGeomParentNode("LineString"); // returns MultiGeom Node
652 for (int i=1; i<p->numlines; i++)
653 {
654 xmlNodePtr lineStringNode = xmlNewChild(geomNode, NULL, BAD_CAST "LineString", NULL);
655 addAddRenderingSpecifications(lineStringNode);
656 addCoordsNode(lineStringNode, p->line[i].point, p->line[i].numpoints);
657 }
658 }
659
660 CurrentDrawnShapeIndex = p->index;
661 }
662
663}
664
665void KmlRenderer::renderPolygon(imageObj*, shapeObj *p, colorObj *color)
666{

Callers 4

msDrawScalebarFunction · 0.80
msRenderLineKmlFunction · 0.80
msDrawLineSymbolFunction · 0.80
msDrawShadeSymbolFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected