Example #1
0
        public static int GetStyleShadowOffset(Style style, StyleInstance styleInstance, float dpi)
        {
            ReportSizeProperty shadowOffset = style.ShadowOffset;

            if (!shadowOffset.IsExpression)
            {
                return(MappingHelper.ToIntPixels(shadowOffset.Value, dpi));
            }
            ReportSize shadowOffset2 = styleInstance.ShadowOffset;

            if (shadowOffset2 != null)
            {
                return(MappingHelper.ToIntPixels(shadowOffset2, dpi));
            }
            return(0);
        }
        public int GetSize(MapPointTemplate mapPointTemplate, bool hasScope)
        {
            ReportSizeProperty size = mapPointTemplate.Size;

            if (size != null)
            {
                if (!size.IsExpression)
                {
                    return(MappingHelper.ToIntPixels(size.Value, base.m_mapMapper.DpiX));
                }
                if (hasScope)
                {
                    return(MappingHelper.ToIntPixels(mapPointTemplate.Instance.Size, base.m_mapMapper.DpiX));
                }
                return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX));
            }
            return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX));
        }
Example #3
0
        public int GetSize(MapLineTemplate mapLineTemplate, bool hasScope)
        {
            ReportSizeProperty width = mapLineTemplate.Width;

            if (width != null)
            {
                if (!width.IsExpression)
                {
                    return(MappingHelper.ToIntPixels(width.Value, base.m_mapMapper.DpiX));
                }
                if (hasScope)
                {
                    return(MappingHelper.ToIntPixels(mapLineTemplate.Instance.Width, base.m_mapMapper.DpiX));
                }
                return(LineTemplateMapper.GetDefaultSize(base.m_mapMapper.DpiX));
            }
            return(LineTemplateMapper.GetDefaultSize(base.m_mapMapper.DpiX));
        }
Example #4
0
        public static int GetStyleBorderWidth(Border border, float dpi)
        {
            ReportSizeProperty width = border.Width;
            int result = MappingHelper.GetDefaultBorderWidth(dpi);

            if (!width.IsExpression)
            {
                if (width.Value != null)
                {
                    result = MappingHelper.ToIntPixels(width.Value, dpi);
                }
            }
            else
            {
                ReportSize width2 = border.Instance.Width;
                if (width2 != null)
                {
                    result = MappingHelper.ToIntPixels(width2, dpi);
                }
            }
            return(result);
        }
 public static int GetDefaultSymbolSize(float dpi)
 {
     return(MappingHelper.ToIntPixels(PointTemplateMapper.m_defaultSymbolSize, dpi));
 }
Example #6
0
 public static int GetDefaultSize(float dpi)
 {
     return(MappingHelper.ToIntPixels(LineTemplateMapper.m_defaultLineWidth, dpi));
 }