< Previous | Contents | Next >

Attributes


Name

Type : Description

ACP_Center

input: specifies which input is used to set the position of the angle control in the view. Typically this is an OffsetControl

ACP_Radius

input : specifies which input is used to set the width of the angle control in the view. Typically this will be a SliderControl.


Example

The following example is a very simplified Fuse which uses a crosshair and angle control to transform an image.


FuRegisterClass("SampleAngleControl", CT_Tool, { REGS_Name = "Sample Angle Control", REGS_Category = "Fuses\\Samples", REGS_OpIconString = "SOf", REGS_OpDescription = "SampleOffset",

})


function Create()

InCenter = self:AddInput("Center", "Center", { LINKID_DataType = "Point", INPID_InputControl = "OffsetControl", INPID_PreviewControl = "CrosshairControl",

})


InAngle = self:AddInput("Angle", "Angle", { LINKID_DataType = "Number", INPID_InputControl = "ScrewControl", INPID_PreviewControl = "AngleControl", INP_MinScale = 0.0,

INP_MaxScale = 360.0,

INP_Default = 0.0, ACP_Center = InCenter,

})


InImage = self:AddInput("Input", "Input", { LINKID_DataType = "Image", LINK_Main = 1,

})


OutImage = self:AddOutput("Output", "Output", { LINKID_DataType = "Image",

LINK_Main = 1,

})


end


function Process(req)

local img = InImage:GetValue(req) local center = InCenter:GetValue(req) local angle = InAngle:GetValue(req).Value


out = img:Transform(nil, { XF_XOffset = center.X, XF_YOffset = center.Y, XF_XAxis = 0.5,

XF_YAxis = 0.5,

XF_XSize = 1,

XF_YSize = 1, XF_Angle = angle,

XF_EdgeMode = "Black",

})


OutImage:Set(req, out)

end