public static DefineSprite buildSprite(System.String name, JPEGImage image) { TagList taglist = new TagList(); try { DefineBits defineBits = build(image); taglist.defineBitsJPEG2(defineBits); DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, image.Width, image.Height); taglist.defineShape3(ds3); PlaceObject po2 = new PlaceObject(ds3, 1); po2.Matrix = new Matrix(); // po2.setName(name); taglist.placeObject2(po2); } catch (System.IO.IOException ex) { //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" throw new System.SystemException("Error reading JPEG image " + image.Location + ". " + ex.Message); } finally { image.dispose(); } return(defineSprite(name, taglist)); }
public static DefineSprite buildSprite(System.String name, JPEGImage image) { TagList taglist = new TagList(); try { DefineBits defineBits = build(image); taglist.defineBitsJPEG2(defineBits); DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, image.Width, image.Height); taglist.defineShape3(ds3); PlaceObject po2 = new PlaceObject(ds3, 1); po2.Matrix = new Matrix(); // po2.setName(name); taglist.placeObject2(po2); } catch (System.IO.IOException ex) { //UPGRADE_TODO: The equivalent in .NET for method 'java.lang.Throwable.getMessage' may return a different value. "ms-help://MS.VSCC.v80/dv_commoner/local/redirect.htm?index='!DefaultContextWindowIndex'&keyword='jlca1043'" throw new System.SystemException("Error reading JPEG image " + image.Location + ". " + ex.Message); } finally { image.dispose(); } return defineSprite(name, taglist); }
public static DefineTag buildSprite(System.String name, LosslessImage image) { TagList taglist = new TagList(); DefineBitsLossless defineBits = build(image); taglist.defineBitsLossless2(defineBits); DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height); taglist.defineShape3(ds3); PlaceObject po2 = new PlaceObject(ds3, 1); po2.Matrix = new Matrix(); //Ahipo2.setName(name); taglist.placeObject2(po2); return defineSprite(name, taglist); }
public static DefineTag buildSprite(System.String name, LosslessImage image) { TagList taglist = new TagList(); DefineBitsLossless defineBits = build(image); taglist.defineBitsLossless2(defineBits); DefineShape ds3 = ImageShapeBuilder.buildImage(defineBits, defineBits.width, defineBits.height); taglist.defineShape3(ds3); PlaceObject po2 = new PlaceObject(ds3, 1); po2.Matrix = new Matrix(); //Ahipo2.setName(name); taglist.placeObject2(po2); return(defineSprite(name, taglist)); }
public virtual void PlaceObject2(SaxAttributesSupport attributes) { PlaceObject tag = new PlaceObject(flash.swf.TagValues_Fields.stagPlaceObject2); tag.depth = parseInt(getAttribute(attributes, "depth")); if (hasAttribute(attributes, "className")) { tag.ClassName = getAttribute(attributes, "className"); } if (hasAttribute(attributes, "hasImage")) { tag.HasImage = getAttribute(attributes, "hasImage").Equals("true"); } if (hasAttribute(attributes, "idref")) { int idref = parseInt(getAttribute(attributes, "idref")); tag.Ref = findCharacter(idref); } if (hasAttribute(attributes, "name")) { tag.Name = getAttribute(attributes, "name"); } if (hasAttribute(attributes, "clipDepth")) { tag.ClipDepth = parseInt(getAttribute(attributes, "clipDepth")); } if (hasAttribute(attributes, "ratio")) { tag.Ratio = parseInt(getAttribute(attributes, "ratio")); } if (hasAttribute(attributes, "cxform")) { tag.Cxform = parseCXForm(getAttribute(attributes, "cxform")); } if (hasAttribute(attributes, "matrix")) { tag.Matrix = parseMatrix(getAttribute(attributes, "matrix")); } stack.Add(tag); text = new System.Text.StringBuilder(); }