Beispiel #1
0
        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 DefineShape buildImage(DefineBits tag, int width, int height)
 {
     return(ImageShapeBuilder.buildImage(tag, width, height));
 }