Exemplo n.º 1
0
 public CSSBorderSideParser(string cssName, PDFStyleKey <PDFUnit> width, PDFStyleKey <PDFColor> color, PDFStyleKey <LineType> style, PDFStyleKey <PDFDash> dash)
     : base(cssName)
 {
     this._width = width;
     this._color = color;
     this._style = style;
     this._dash  = dash;
 }
 public CSSThicknessAllParser(string cssAttr, PDFStyleKey <PDFUnit> all, PDFStyleKey <PDFUnit> left, PDFStyleKey <PDFUnit> top, PDFStyleKey <PDFUnit> right, PDFStyleKey <PDFUnit> bottom)
     : base(cssAttr)
 {
     _all    = all;
     _left   = left;
     _right  = right;
     _top    = top;
     _bottom = bottom;
 }
        public CSSEnumStyleParser(string styleItemKey, PDFStyleKey <T> pdfAttr)
            : base(styleItemKey, pdfAttr)
        {
            _enumType = typeof(T);

            if (_enumType.IsEnum == false)
            {
                throw new InvalidCastException("The type " + typeof(T).FullName + " is not an enumeration");
            }
        }
Exemplo n.º 4
0
        protected bool AttachExpressionBindingHandler <AttrT>(Style style, PDFStyleKey <AttrT> key, string value, StyleValueConvertor <AttrT> convert)
        {
            StyleValueExpression <AttrT> expression = new StyleValueExpression <AttrT>(key, value, convert);

            style.DataBinding += expression.BindValue;

            if (style.IsValueDefined(key))
            {
                style.RemoveValue(key);
            }

            style.AddValue(expression);
            return(true);
        }
 public CSSBreakBeforeAfterParser(string name, PDFStyleKey <bool> key)
     : base(name, key)
 {
 }
Exemplo n.º 6
0
 public CSSColorStyleParser(string styleItemKey, PDFStyleKey <PDFColor> pdfAttr, PDFStyleKey <double> opacity)
     : base(styleItemKey, pdfAttr)
 {
     _opacity = opacity;
 }
 public CSSFillColourParser(string css, PDFStyleKey <PDFColor> key, PDFStyleKey <double> opacity)
     : base(css, key, opacity)
 {
 }
 public CSSStyleAttributeParser(string itemName, PDFStyleKey <T> styleAttr)
     : base(itemName)
 {
     _styleAttr = styleAttr ?? throw new ArgumentNullException("styleAttr");
 }
Exemplo n.º 9
0
 public CSSBorderStyleParser(string attr, PDFStyleKey <LineType> style, PDFStyleKey <PDFDash> dash)
     : base(attr, style)
 {
     this._dash = dash;
 }
Exemplo n.º 10
0
 public CSSUrlStyleParser(string styleItemKey, PDFStyleKey <string> pdfAttr, bool allowGradients = true)
     : base(styleItemKey, pdfAttr)
 {
     _allowGradients = allowGradients;
 }
 public CSSBorderWidthParser(string attr, PDFStyleKey <PDFUnit> styleKey)
     : base(attr, styleKey)
 {
 }
 public CSSOpacityParser(string css, PDFStyleKey <double> key)
     : base(css, key)
 {
 }
 public CSSThicknessValueParser(string cssName, PDFStyleKey <PDFUnit> pdfAttr)
     : base(cssName, pdfAttr)
 {
     AutoValue = PDFUnit.Zero;
 }
 public CSSBreakInsideParser(string cssName, PDFStyleKey <OverflowAction> actionKey, PDFStyleKey <OverflowSplit> splitKey)
     : base(cssName)
 {
     this.ActionKey = actionKey;
     this.SplitKey  = splitKey;
 }
Exemplo n.º 15
0
 public CSSUnitStyleParser(string styleItemKey, PDFStyleKey <Scryber.Drawing.PDFUnit> pdfAttr)
     : base(styleItemKey, pdfAttr)
 {
 }