internal MapPolygonTemplateInstance(MapPolygonTemplate defObject) : base(defObject) { m_defObject = defObject; }
internal void Render(MapPolygon mapPolygon, Shape coreShape, bool hasScope) { bool num = UseCustomTemplate(mapPolygon, hasScope); MapPolygonTemplate mapPolygonTemplate = (!num) ? MapPolygonLayer.MapPolygonTemplate : mapPolygon.MapPolygonTemplate; bool ignoreBackgroundColor = !num && m_polygonLayerMapper.HasColorRule(coreShape) && hasScope; if (mapPolygonTemplate == null) { RenderStyle(null, null, coreShape, ignoreBackgroundColor, hasScope); coreShape.BorderStyle = GetBorderStyle(null, null, hasScope); return; } RenderSpatialElementTemplate(mapPolygonTemplate, coreShape, ignoreBackgroundColor, hasScope); Style style = mapPolygonTemplate.Style; StyleInstance style2 = mapPolygonTemplate.Instance.Style; coreShape.BorderStyle = GetBorderStyle(style, style2, hasScope); ReportDoubleProperty scaleFactor = mapPolygonTemplate.ScaleFactor; if (scaleFactor != null) { if (!scaleFactor.IsExpression) { coreShape.ScaleFactor = scaleFactor.Value; } else if (hasScope) { coreShape.ScaleFactor = mapPolygonTemplate.Instance.ScaleFactor; } } ReportDoubleProperty centerPointOffsetX = mapPolygonTemplate.CenterPointOffsetX; if (centerPointOffsetX != null) { if (!centerPointOffsetX.IsExpression) { coreShape.CentralPointOffset.X = centerPointOffsetX.Value; } else if (hasScope) { coreShape.CentralPointOffset.X = mapPolygonTemplate.Instance.CenterPointOffsetX; } } centerPointOffsetX = mapPolygonTemplate.CenterPointOffsetY; if (centerPointOffsetX != null) { if (!centerPointOffsetX.IsExpression) { coreShape.CentralPointOffset.Y = centerPointOffsetX.Value; } else if (hasScope) { coreShape.CentralPointOffset.Y = mapPolygonTemplate.Instance.CenterPointOffsetY; } } ReportEnumProperty <MapAutoBool> showLabel = mapPolygonTemplate.ShowLabel; if (showLabel != null) { if (!showLabel.IsExpression) { coreShape.TextVisibility = GetTextVisibility(showLabel.Value); } else if (hasScope) { coreShape.TextVisibility = GetTextVisibility(mapPolygonTemplate.Instance.ShowLabel); } } ReportEnumProperty <MapPolygonLabelPlacement> labelPlacement = mapPolygonTemplate.LabelPlacement; if (labelPlacement != null) { if (!labelPlacement.IsExpression) { coreShape.TextAlignment = GetTextAlignment(labelPlacement.Value); } else if (hasScope) { coreShape.TextAlignment = GetTextAlignment(mapPolygonTemplate.Instance.LabelPlacement); } } }