Skip to content
Permalink
Browse files

Merge branch 'master' of https://github.com/qgis/Quantum-GIS

  • Loading branch information
volaya committed Oct 2, 2012
2 parents 6548e2e + 8a1ad57 commit 6369196210354c43c027a235cc2e6156aea038bc
@@ -8,8 +8,6 @@
%Include conversions.sip
%Include qgsexception.sip

// TODO: more files to wrap

%Include qgis.sip

%Include qgsapplication.sip
@@ -8,18 +8,54 @@ class QgsSymbolLayerV2
switch (sipCpp->type())
{
case QgsSymbolV2::Marker:
if( sipCpp->layerType() == "VectorField" )
{
sipClass = sipClass_QgsVectorFieldSymbolLayer;
}
if (dynamic_cast<QgsEllipseSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsEllipseSymbolLayerV2;
else if (dynamic_cast<QgsFontMarkerSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsFontMarkerSymbolLayerV2;
else if (dynamic_cast<QgsSimpleMarkerSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsSimpleMarkerSymbolLayerV2;
else if (dynamic_cast<QgsSvgMarkerSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsSvgMarkerSymbolLayerV2;
else if (dynamic_cast<QgsVectorFieldSymbolLayer*>(sipCpp) != NULL)
sipClass = sipClass_QgsVectorFieldSymbolLayer;
else
sipClass = sipClass_QgsMarkerSymbolLayerV2;
break;

case QgsSymbolV2::Line:
if (dynamic_cast<QgsLineDecorationSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsLineDecorationSymbolLayerV2;
else if (dynamic_cast<QgsMarkerLineSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsMarkerLineSymbolLayerV2;
else if (dynamic_cast<QgsSimpleLineSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsSimpleLineSymbolLayerV2;
else
sipClass = sipClass_QgsLineSymbolLayerV2;
break;

case QgsSymbolV2::Fill:
if (dynamic_cast<QgsSimpleFillSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsSimpleFillSymbolLayerV2;
else if (dynamic_cast<QgsImageFillSymbolLayer*>(sipCpp) != NULL)
{
sipClass = sipClass_QgsMarkerSymbolLayerV2;
if (dynamic_cast<QgsLinePatternFillSymbolLayer*>(sipCpp) != NULL)
sipClass = sipClass_QgsLinePatternFillSymbolLayer;
else if (dynamic_cast<QgsPointPatternFillSymbolLayer*>(sipCpp) != NULL)
sipClass = sipClass_QgsPointPatternFillSymbolLayer;
else if (dynamic_cast<QgsSVGFillSymbolLayer*>(sipCpp) != NULL)
sipClass = sipClass_QgsSVGFillSymbolLayer;
else
sipClass = sipClass_QgsImageFillSymbolLayer;
}
else if (dynamic_cast<QgsCentroidFillSymbolLayerV2*>(sipCpp) != NULL)
sipClass = sipClass_QgsCentroidFillSymbolLayerV2;
else
sipClass = sipClass_QgsFillSymbolLayerV2;
break;

default:
sipClass = 0;
break;
case QgsSymbolV2::Line: sipClass = sipClass_QgsLineSymbolLayerV2; break;
case QgsSymbolV2::Fill: sipClass = sipClass_QgsFillSymbolLayerV2; break;
default: sipClass = 0; break;
}
%End

@@ -274,7 +274,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::createFromSld( QDomElement &element )
return NULL;

QString name = "circle";
QColor color, borderColor;
QColor fillColor, borderColor;
double borderWidth, size;
double widthHeightFactor = 1.0;

@@ -290,7 +290,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::createFromSld( QDomElement &element )
}
}

if ( !QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( graphicElem, name, color, borderColor, borderWidth, size ) )
if ( !QgsSymbolLayerV2Utils::wellKnownMarkerFromSld( graphicElem, name, fillColor, borderColor, borderWidth, size ) )
return NULL;

double angle = 0.0;
@@ -305,7 +305,7 @@ QgsSymbolLayerV2* QgsEllipseSymbolLayerV2::createFromSld( QDomElement &element )

QgsEllipseSymbolLayerV2 *m = new QgsEllipseSymbolLayerV2();
m->setSymbolName( name );
m->setColor( color );
m->setFillColor( fillColor );
m->setOutlineColor( borderColor );
m->setOutlineWidth( borderWidth );
m->setSymbolWidth( size );

0 comments on commit 6369196

Please sign in to comment.
You can’t perform that action at this time.