Exemplo n.º 1
0
        internal static string GetStylePropertyValueString(RPLElementProps properties, byte style, ref bool fromInstance)
        {
            object stylePropertyValueObject = SharedRenderer.GetStylePropertyValueObject(properties, style, ref fromInstance);

            if (stylePropertyValueObject == null)
            {
                return(null);
            }
            return((string)stylePropertyValueObject);
        }
Exemplo n.º 2
0
        internal static float GetStylePropertyValueSizePT(RPLElementProps properties, byte style, ref bool fromInstance)
        {
            string text = (string)SharedRenderer.GetStylePropertyValueObject(properties, style, ref fromInstance);

            if (string.IsNullOrEmpty(text))
            {
                return(float.NaN);
            }
            return((float)new RPLReportSize(text).ToPoints());
        }
Exemplo n.º 3
0
        internal static float GetStylePropertyValueSizeMM(RPLElementProps properties, byte style)
        {
            string text = (string)SharedRenderer.GetStylePropertyValueObject(properties, style);

            if (string.IsNullOrEmpty(text))
            {
                return(float.NaN);
            }
            return((float)new RPLReportSize(text).ToMillimeters());
        }
Exemplo n.º 4
0
        internal static Color GetStylePropertyValueColor(RPLElementProps properties, byte style)
        {
            string text = (string)SharedRenderer.GetStylePropertyValueObject(properties, style);

            if (string.IsNullOrEmpty(text) || string.Compare(text, "TRANSPARENT", StringComparison.OrdinalIgnoreCase) == 0)
            {
                return(Color.Empty);
            }
            return(new RPLReportColor(text).ToColor());
        }
Exemplo n.º 5
0
        internal override void ProcessRenderingElementContent(RPLElement rplElement, GdiContext context, RectangleF bounds)
        {
            Color = GdiContext.GetStylePropertyValueColor(InstanceProperties, 0);
            Width = GdiContext.GetStylePropertyValueSizeMM(InstanceProperties, 10);
            switch ((RPLFormat.BorderStyles)SharedRenderer.GetStylePropertyValueObject(InstanceProperties, 5))
            {
            case RPLFormat.BorderStyles.Dotted:
                Style = DashStyle.Dot;
                break;

            case RPLFormat.BorderStyles.Dashed:
                Style = DashStyle.Dash;
                break;

            default:
                Style = DashStyle.Solid;
                break;
            }
        }
Exemplo n.º 6
0
        internal void ProcessBackgroundColorAndImage(GdiContext context, RPLElementProps properties)
        {
            m_backgroundColor = GdiContext.GetStylePropertyValueColor(properties, 34);
            object stylePropertyValueObject = SharedRenderer.GetStylePropertyValueObject(properties, 33);

            if (stylePropertyValueObject != null)
            {
                m_backgroundImage = GetImage(context, (RPLImageData)stylePropertyValueObject);
                object stylePropertyValueObject2 = SharedRenderer.GetStylePropertyValueObject(properties, 35);
                if (stylePropertyValueObject2 == null)
                {
                    m_backgroundRepeat = RPLFormat.BackgroundRepeatTypes.Repeat;
                }
                else
                {
                    m_backgroundRepeat = (RPLFormat.BackgroundRepeatTypes)stylePropertyValueObject2;
                }
            }
        }