public frmUVMapDialog(DPOW.Reader.Image image, String imagename) { InitializeComponent(); refImage = image; ImageName = imagename; this.Text = "UV Map - Texture: " + imagename; }
public frmScaleDialog(DPOW.Reader.Image image) { InitializeComponent(); refImage = image; txtRefPointX.Text = refImage.Position.X.ToString(); txtRefPointY.Text = refImage.Position.Y.ToString(); }
public ParametricImage(DPOW.Reader.Image originalImage) { color = new ParametricColor(originalImage.Color); center = new ParametricPoint(originalImage.Position); points = new ParametricPoint[originalImage.Points.Length]; for (int i = 0; i < points.Length; i++) { points[i] = new ParametricPoint(originalImage.Points[i]); } visible = originalImage.Visible; gradient = originalImage.isGradient; texid = originalImage.TextureId; }
public void ApplyToImage(DPOW.Reader.Image destImage, float t) { destImage.Visible = visible; destImage.isGradient = gradient; destImage.TextureId = texid; center.ApplyToPoint(destImage.Position, t); for (int i = 0; i < points.Length; i++) { points[i].ApplyToPoint(destImage.Points[i], t); } Color newColor = destImage.Color; color.ApplyToColor(ref newColor, t); destImage.Color = newColor; }
private void pastToolStripMenuItem_Click(object sender, EventArgs e) { DPOW.Reader.Animation obj = dpow.getAnimation(treObjects.SelectedNode.Text); if (Clipboard.ContainsData("DPOWImage")) { DPOW.Reader.Image temp = (DPOW.Reader.Image)DeSerialize(Clipboard.GetData("DPOWImage").ToString()); if (temp.TextureId >= dpow.Textures.Length) { temp.TextureId = 0; } obj.getFrameOnTime(trcFrameBar.Value).Element.addImage(temp); } else if (Clipboard.ContainsData("DPOWText")) { obj.getFrameOnTime(trcFrameBar.Value).Element.addText((DPOW.Reader.Text)DeSerialize(Clipboard.GetData("DPOWText").ToString())); } else if (Clipboard.ContainsData("DPOWIcon")) { obj.getFrameOnTime(trcFrameBar.Value).Element.addIcon((DPOW.Reader.Icon)DeSerialize(Clipboard.GetData("DPOWIcon").ToString())); } drawFrame(); }