public void PDFStylesDocumentConstructorTest1() { PDFObjectType type = (PDFObjectType)"0000"; StylesDocument target = new StylesDocument(type); Assert.AreEqual(type, target.Type); }
public ComponentList(Component owner, PDFObjectType Componenttype) : base(Componenttype) { this._owner = owner; this._items = new InnerComponentList(this); this._noopcount = 0; }
/// <summary> /// NOT THREAD SAFE implementation of CreateStyleItemKey that creates a new Item StyleKey. /// </summary> /// <param name="name"></param> /// <param name="inherited"></param> /// <returns></returns> /// <remarks>Used by the PDFStyleKeys static type constructor - as we are assured this is threadsafe</remarks> internal static StyleKey InternalCreateStyleItemKey(PDFObjectType item, bool inherited) { string full = GetStyleKeyAsString(item, StyleItemIdentifier); int hash = InternalGetStyleHash(full); return(new StyleKey(hash, item, StyleItemIdentifier, inherited, true)); }
internal static Resource Factory(PDFDirect d) { PDFObjectType type1 = d.PDFType; switch (type1) { case PDFObjectType.tPDFDict: { goto Label_0024; } case PDFObjectType.tPDFArray: { goto Label_002B; } case PDFObjectType.tPDFStream: { goto Label_001D; } } goto Label_002B; Label_001D: return(new PatternTiling(d)); Label_0024: return(new PatternShading(d)); Label_002B: throw new PDFSyntaxException(d, "Invalid Pattern"); }
// // .ctor // #region protected PDFStyleKey(int fullhash, PDFObjectType item, PDFObjectType value, bool inherited, bool isItem) /// <summary> /// Creates a new instance of an immutable style key with the specified values. /// </summary> /// <param name="fullhash">The integer value that uniquely identifies this item / value compound key</param> /// <param name="item">The style item associated with this key</param> /// <param name="value">The style key associated with the value in the item</param> /// <param name="inherited">True if values for this key should be inherited in children</param> /// <param name="isItem">True if this is an item key (rather than a value item key)</param> protected StyleKey(int fullhash, PDFObjectType item, PDFObjectType value, bool inherited, bool isItem) { this._item = item; this._value = value; this._isInherited = inherited; this._fullhash = fullhash; }
protected ForEach(PDFObjectType type) : base(type) { _start = 0; _count = int.MaxValue; _step = 1; CacheStyles = true; }
protected ImageBase(PDFObjectType type) : base(type) { var config = ServiceProvider.GetService <IScryberConfigurationService>(); this.MinimumScaleReduction = config.ImagingOptions.MinimumScaleReduction; this.AllowMissingImages = config.ImagingOptions.AllowMissingImages; }
internal void DecryptObject(PDFDirect direct, int id, int gene) { PDFObject obj2; IEnumerator enumerator1; IDisposable disposable1; PDFObjectType type1 = direct.PDFType; switch (type1) { case PDFObjectType.tPDFString: { ((CorePDFString)direct).mValue = Utils.BytesToString(this.Encryption.DecryptString(((CorePDFString)direct), id, gene)); return; } case PDFObjectType.tPDFDict: { goto Label_008F; } case PDFObjectType.tPDFArray: { foreach (PDFObject obj1 in ((PDFArray)direct)) { if (obj1.IsIndirect) { continue; } this.DecryptObject(obj1.Direct, id, gene); } return; } } return; Label_008F: enumerator1 = ((PDFDict)direct).Values.GetEnumerator(); try { while (enumerator1.MoveNext()) { obj2 = ((PDFObject)enumerator1.Current); if (obj2.IsIndirect) { continue; } this.DecryptObject(obj2.Direct, id, gene); } } finally { disposable1 = (enumerator1 as IDisposable); if (disposable1 != null) { disposable1.Dispose(); } } }
public void Type_Test() { PDFBoolean target = new PDFBoolean(false); PDFObjectType expected = PDFObjectTypes.Boolean; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { PDFNull target = PDFNull.Value; PDFObjectType expected = PDFObjectTypes.Null; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { PDFString target = new PDFString(); PDFObjectType expected = PDFObjectTypes.String; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { PDFNumber target = new PDFNumber(); PDFObjectType expected = PDFObjectTypes.Number; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { PDFArray target = new PDFArray(); PDFObjectType actual; actual = target.Type; PDFObjectType expected = PDFObjectTypes.Array; Assert.AreEqual(expected, actual); }
protected PDFColor(ColorSpace cs, System.Drawing.Color c, PDFObjectType type) : base(type) { if (cs == ColorSpace.LAB || cs == ColorSpace.Custom) { throw new ArgumentOutOfRangeException(String.Format(Errors.ColorValueIsNotCurrentlySupported, this.ColorSpace.ToString()), "cs"); } this._cs = cs; this._c = c; }
public void Type_Test() { PDFDictionary target = new PDFDictionary(); PDFObjectType expected = PDFObjectTypes.Dictionary; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { string name = "Name"; PDFName target = new PDFName(name); PDFObjectType actual; actual = target.Type; PDFObjectType expected = PDFObjectTypes.Name; Assert.AreEqual(expected, actual); }
/// <summary> /// Returns a new ID for this object type /// </summary> /// <param name="type"></param> /// <returns></returns> public virtual string GetIncrementID(PDFObjectType type) { if (this.Parent != null) { return(this.Parent.GetIncrementID(type)); } else { return(TempIDFactory.GetTempID(type)); } }
/// <summary> /// NOT THREAD SAFE implementation of of CreateStyleValueKey that /// creates a new Value StyleKey based on the item StyleKey and the name of the value /// </summary> /// <param name="name"></param> /// <param name="foritem"></param> /// <returns></returns> /// <remarks>Used by the PDFStyleKeys style type constructor - as we are assured this is threadsafe</remarks> internal static PDFStyleKey <T> InternalCreateStyleValueKey <T>(PDFObjectType name, StyleKey foritem) { if (foritem.IsItemKey == false) { throw new InvalidOperationException("forItem is not an item"); } string full = GetStyleKeyAsString(foritem.StyleItemKey, name); int hash = InternalGetStyleHash(full); return(new PDFStyleKey <T>(hash, foritem.StyleItemKey, name, foritem.Inherited, false)); }
/// <summary> /// Creates a new empty graphics path, ready to start adding operations to. /// </summary> protected PDFGraphicsPath(PDFObjectType type) : base(type) { Path p = new Path(); _paths = new List <Path>(); _paths.Add(p); _stack = new Stack <Path>(); _stack.Push(p); _bounds = PDFRect.Empty; }
public void Type_Test() { PDFReal target = new PDFReal(); PDFObjectType expected = PDFObjectTypes.Real; PDFObjectType actual; actual = target.Type; Assert.AreEqual(expected, actual); target = 10.5; actual = target.Type; Assert.AreEqual(expected, actual); }
public void Type_Test() { IStreamFilter[] filters = _usefilters; PDFIndirectObject indobj = new PDFIndirectObject(this); PDFStream target = new StreamProxy(filters, indobj); PDFObjectType actual; actual = target.Type; PDFObjectType expected = PDFObjectTypes.Stream; Assert.AreEqual(expected, actual); target.Dispose(); indobj.Dispose(); }
protected XMLDataSource(PDFObjectType type) : base(type) { }
protected Number(PDFObjectType type) : base(type) { }
protected DataGridImageRefColumn(PDFObjectType type) : base(type) { }
public DataRelation(PDFObjectType type) : base(type) { }
protected ListOrdered(PDFObjectType type) : base(type) { }
protected FormInputField(PDFObjectType type) : base(type) { }
protected PageGroup(PDFObjectType type) : base(type) { }
public Ellipse(PDFObjectType type) : base(type) { this.DefaultRotation = 0; }
protected HtmlFragment(PDFObjectType type) : base(type) { }