131 {
132
134
136
138
140
142
143 SDL_Point points[3];
144
145 points[0].x = frame.x;
146 points[0].y = frame.y + frame.h;
147
148 points[1].x = frame.x + frame.w;
149 points[1].y = frame.y + frame.h;
150
151 points[2].x = frame.x + frame.w;
152 points[2].y = frame.y;
153
154 $(renderer,
drawLines, points, lengthof(points));
155
157
158 points[0].x = frame.x;
159 points[0].y = frame.y + frame.h;
160
161 points[1].x = frame.x;
162 points[1].y = frame.y;
163
164 points[2].x = frame.x + frame.w;
165 points[2].y = frame.y;
166
167 $(renderer,
drawLines, points, lengthof(points));
168
170
172
173 SDL_Point points[3];
174
175 points[0].x = frame.x;
176 points[0].y = frame.y + frame.h;
177
178 points[1].x = frame.x + frame.w;
179 points[1].y = frame.y + frame.h;
180
181 points[2].x = frame.x + frame.w;
182 points[2].y = frame.y;
183
184 $(renderer,
drawLines, points, lengthof(points));
185
187
188 points[0].x = frame.x;
189 points[0].y = frame.y + frame.h;
190
191 points[1].x = frame.x;
192 points[1].y = frame.y;
193
194 points[2].x = frame.x + frame.w;
195 points[2].y = frame.y;
196
197 $(renderer,
drawLines, points, lengthof(points));
198 }
199
201
203
205 }
206
208}
void drawRect(const Renderer *self, const SDL_Rect *rect)
Draws a rectangle using GL_LINE_LOOP.
void drawLines(const Renderer *self, const SDL_Point *points, size_t count)
Draws line segments between adjacent points using GL_LINE_STRIP.
void setDrawColor(Renderer *self, const SDL_Color *color)
Sets the primary color for drawing operations.
SDL_Rect renderFrame(const View *self)