[core] Rationalize style property classes: <type>{Paint,Layout}Properties

This commit is contained in:
John Firebaugh
2015-10-19 13:19:52 -07:00
parent 83d39364f9
commit df89de5cc5
31 changed files with 279 additions and 352 deletions

View File

@@ -223,11 +223,11 @@ void GLFWView::addRandomPointAnnotations(int count) {
void GLFWView::addRandomShapeAnnotations(int count) {
std::vector<mbgl::ShapeAnnotation> shapes;
mbgl::FillProperties fillProperties;
mbgl::FillPaintProperties fillProperties;
fillProperties.opacity = .1;
mbgl::StyleProperties properties;
properties.set<mbgl::FillProperties>(fillProperties);
properties.set<mbgl::FillPaintProperties>(fillProperties);
for (int i = 0; i < count; i++) {
mbgl::AnnotationSegment triangle;

View File

@@ -2175,11 +2175,11 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
[self.delegate mapView:self lineWidthForPolylineAnnotation:(MGLPolyline *)annotation] :
3.0);
mbgl::LineProperties lineProperties;
mbgl::LinePaintProperties lineProperties;
lineProperties.opacity = alpha;
lineProperties.color = strokeNativeColor;
lineProperties.width = lineWidth;
shapeProperties.set<mbgl::LineProperties>(lineProperties);
shapeProperties.set<mbgl::LinePaintProperties>(lineProperties);
}
else if ([annotation isKindOfClass:[MGLPolygon class]])
@@ -2193,11 +2193,11 @@ CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng)
[fillColor getRed:&r green:&g blue:&b alpha:&a];
mbgl::Color fillNativeColor({{ (float)r, (float)g, (float)b, (float)a }});
mbgl::FillProperties fillProperties;
mbgl::FillPaintProperties fillProperties;
fillProperties.opacity = alpha;
fillProperties.stroke_color = strokeNativeColor;
fillProperties.fill_color = fillNativeColor;
shapeProperties.set<mbgl::FillProperties>(fillProperties);
shapeProperties.set<mbgl::FillPaintProperties>(fillProperties);
}
else
{