Example #1
0
        private static GSPat.ImageManipulation ExportIM(Pat.Frame frame, Pat.FrameImage image)
        {
            var scaleX     = frame.ScaleX;
            var scaleY     = frame.ScaleY;
            var rotation   = frame.Rotation;
            var alphaBlend = image.AlphaBlendMode;

            //TODO add other fields
            if (scaleX == 100 && scaleY == 100 && rotation == 0 && !alphaBlend)
            {
                return(null);
            }
            return(new GSPat.ImageManipulation
            {
                AlphaBlend = (short)(alphaBlend ? 1 : 0),
                ScaleX = (short)scaleX,
                ScaleY = (short)scaleY,
                Rotation = (short)rotation,

                Alpha = (byte)(255 * frame.Alpha),
                Red = (byte)(255 * frame.Red),
                Green = (byte)(255 * frame.Green),
                Blue = (byte)(255 * frame.Blue),
            });
        }
        private ListViewItem CreateItem(Pat.FrameImage img)
        {
            var ret = new ListViewItem(new string[] { img.ImageID, img.Resource.ResourceID }, -1);

            ret.StateImageIndex = 0;
            ret.Tag             = img;
            return(ret);
        }
 private void SetupImage(Pat.FrameImage img)
 {
     textBox1.Text = img.ImageID;
     pictureBox1.Invalidate();
 }
Example #4
0
 public void AddImage(GSPat.GSPatFile file, Pat.FrameImage image)
 {
     _ImageToFile.Add(image.ImageID, file.Images.Count);
     file.Images.Add(image.Resource.ResourceID);
     _ImageIDToObj.Add(image.ImageID, image);
 }