MCPcopy Create free account
hub / github.com/TypesettingTools/Aegisub / DrawRectangle

Method DrawRectangle

src/gl_wrap.cpp:126–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

124}
125
126void OpenGLWrapper::DrawRectangle(Vector2D p1, Vector2D p2) const {
127 VertexArray buf(2, 4);
128 buf.Set(0, p1);
129 buf.Set(1, Vector2D(p2, p1));
130 buf.Set(2, p2);
131 buf.Set(3, Vector2D(p1, p2));
132
133 // Fill
134 if (fill_a != 0.f) {
135 SetModeFill();
136 buf.Draw(GL_QUADS, false);
137 }
138 // Outline
139 if (line_a != 0.f) {
140 SetModeLine();
141 buf.Draw(GL_LINE_LOOP);
142 }
143}
144
145void OpenGLWrapper::DrawTriangle(Vector2D p1, Vector2D p2, Vector2D p3) const {
146 VertexArray buf(2, 3);

Callers 15

OnPaintMethod · 0.80
OnPaintMethod · 0.80
OnPaintMethod · 0.80
DrawMethod · 0.80
RenderMethod · 0.80
RenderBlankMethod · 0.80
OnPaintMethod · 0.80
UpdateBitmapMethod · 0.80
DropFromScreenXYMethod · 0.80
UpdateSpectrumDisplayMethod · 0.80
PaintMethod · 0.80

Calls 3

Vector2DClass · 0.85
SetMethod · 0.45
DrawMethod · 0.45

Tested by 1

RenderBlankMethod · 0.64