BakkesMod Programming Wiki
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

CanvasWrapper

View Implementation

void 
SetPosition(Vector2 pos)


Parameter Type Description
pos Vector2

Vector2F 
GetPositionFloat()



void 
SetColor(LinearColor color)


Parameter Type Description
color LinearColor

LinearColor 
GetColor()



void 
DrawBox(Vector2 size)


Parameter Type Description
size Vector2

void 
FillBox(Vector2 size)


Parameter Type Description
size Vector2

void 
FillTriangle(Vector2 p1, Vector2 p2, Vector2 p3, LinearColor color)


Parameter Type Description
p1 Vector2
p2 Vector2
p3 Vector2
color LinearColor

void 
DrawString(std::string text, float xScale, float yScale, bool dropShadow, bool wrapText=false)


Parameter Type Description
text std::string
xScale float
yScale float
dropShadow bool
wrapText bool

Vector2F 
GetStringSize(std::string text, float xScale=1, float yScale=1)


Parameter Type Description
text std::string
xScale float
yScale float

void 
DrawLine(Vector2 start, Vector2 end, float width)


Parameter Type Description
start Vector2
end Vector2
width float

void 
DrawRect(Vector2 start, Vector2 end)


Parameter Type Description
start Vector2
end Vector2

void 
DrawTexture(ImageWrapper *img, float scale)


Parameter Type Description
img ImageWrapper
scale float

void 
DrawTile(ImageWrapper *img, float XL, float YL, float U, float V, float UL, float VL, LinearColor Color, unsigned int ClipTile, unsigned char Blend)


Parameter Type Description
img ImageWrapper
XL float
YL float
U float
V float
UL float
VL float
Color LinearColor
ClipTile unsigned int
Blend unsigned char

void 
DrawRotatedTile(ImageWrapper *img, Rotator &Rotation, float XL, float YL, float U, float V, float UL, float VL, float AnchorX, float AnchorY)


Parameter Type Description
img ImageWrapper
Rotation Rotator
XL float
YL float
U float
V float
UL float
VL float
AnchorX float
AnchorY float

Vector2 
GetPosition()



Vector2 
Project(Vector location)


Parameter Type Description
location Vector

Vector2F 
ProjectF(Vector location)


Parameter Type Description
location Vector

Vector2 
GetSize()