void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; if (i1 == null) { return; } if (i1.Id == 0) { return; } CreateBufferIfNeeded(); Matrix3 rot = Matrix3.CreateRotationZ(angle * (float)(Math.PI / 180.0)); Matrix3 scale = Matrix3.CreateScale(1.0f / scaleX, 1.0f / scaleY, 1); Vector3 trans = new Vector3(xoffset, yoffset, 0); processor.TileX = tileX; processor.TileY = tileY; processor.Rotation = rot; processor.Scale = scale; processor.Translation = trans; processor.Process(width, height, i1, buffer); processor.Complete(); Updated(); Output.Data = buffer; Output.Changed(); }
void Process() { if (!input.HasInput) { return; } GLTextuer2D i1 = (GLTextuer2D)input.Reference.Data; if (i1 == null) { return; } if (i1.Id == 0) { return; } CreateBufferIfNeeded(); Matrix3 rot = Matrix3.CreateRotationZ(pangle * (float)(Math.PI / 180.0)); Matrix3 scale = Matrix3.CreateScale(1.0f / pscaleX, 1.0f / pscaleY, 1); Vector3 trans = new Vector3(pxoffset * width, pyoffset * height, 0); processor.TileX = tileX; processor.TileY = tileY; processor.Rotation = rot; processor.Scale = scale; processor.Translation = trans; processor.Process(width, height, i1, buffer); processor.Complete(); Output.Data = buffer; TriggerTextureChange(); }
void Process() { GLTextuer2D i1 = (GLTextuer2D)input.Input.Data; if (i1 == null) { return; } if (i1.Id == 0) { return; } CreateBufferIfNeeded(); float pangle = angle; float pscaleX = scaleX; float pscaleY = scaleY; float pxoffset = xoffset; float pyoffset = yoffset; if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "XOffset")) { pxoffset = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "XOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "YOffset")) { pyoffset = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "YOffset")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleX")) { pscaleX = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "ScaleX")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "ScaleY")) { pscaleY = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "ScaleY")); } if (ParentGraph != null && ParentGraph.HasParameterValue(Id, "Angle")) { pangle = Convert.ToSingle(ParentGraph.GetParameterValue(Id, "Angle")); } Matrix3 rot = Matrix3.CreateRotationZ(pangle * (float)(Math.PI / 180.0)); Matrix3 scale = Matrix3.CreateScale(1.0f / pscaleX, 1.0f / pscaleY, 1); Vector3 trans = new Vector3(pxoffset, pyoffset, 0); processor.TileX = tileX; processor.TileY = tileY; processor.Rotation = rot; processor.Scale = scale; processor.Translation = trans; processor.Process(width, height, i1, buffer); processor.Complete(); Updated(); Output.Data = buffer; Output.Changed(); }