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

Method createIconImage

mapkmlrenderer.cpp:792–814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

790imageObj *agg2CreateImage(int width, int height, outputFormatObj *format, colorObj * bg);
791
792int KmlRenderer::createIconImage(char *fileName, symbolObj *symbol, symbolStyleObj *symstyle)
793{
794 pointObj p;
795
796 imageObj *tmpImg = NULL;
797
798 tmpImg = agg2CreateImage((int)(symbol->sizex*symstyle->scale),
799 (int)(symbol->sizey*symstyle->scale),
800 aggFormat, NULL);
801 tmpImg->format = aggFormat;
802 if (!aggFormat->vtable)
803 msInitializeRendererVTable(aggFormat);
804
805 p.x = symbol->sizex * symstyle->scale / 2;
806 p.y = symbol->sizey *symstyle->scale / 2;
807#ifdef USE_POINT_Z_M
808 p.z = 0.0;
809#endif
810
811 msDrawMarkerSymbol(&map->symbolset,tmpImg, &p, symstyle->style, 1);
812
813 return msSaveImage(map, tmpImg, fileName);
814}
815
816void KmlRenderer::renderSymbol(imageObj *img, double x, double y, symbolObj *symbol, symbolStyleObj *style)
817{

Callers

nothing calls this directly

Calls 4

agg2CreateImageFunction · 0.85
msDrawMarkerSymbolFunction · 0.85
msSaveImageFunction · 0.85

Tested by

no test coverage detected