Name | Type | is_array | initial_value |
tempFile | string | No | |
tempRect | rect | No |
function CreateRectImage(file, r, wantHeight)
local a = GetRectMaxX(r) - GetRectMinX(r)
local b = GetRectMaxY(r) - GetRectMinY(r)
local l = nil
bj_lastCreatedImage = CreateImage(file, a, b, 0, GetRectCenterX(r), GetRectCenterY(r), 0, a/2, b/2, 0, 2)
SetImageRenderAlways( bj_lastCreatedImage, true)
if wantHeight then
l = Location(GetRectCenterX(r), GetRectCenterY(r))
SetImageConstantHeight( bj_lastCreatedImage, true, GetLocationZ(l))
RemoveLocation(l)
l = nil
end
end