0
|
1 <HTML
|
|
2 ><HEAD
|
|
3 ><TITLE
|
|
4 >SDL_FillRect</TITLE
|
|
5 ><META
|
|
6 NAME="GENERATOR"
|
|
7 CONTENT="Modular DocBook HTML Stylesheet Version 1.61
|
|
8 "><LINK
|
|
9 REL="HOME"
|
|
10 TITLE="SDL Library Documentation"
|
|
11 HREF="index.html"><LINK
|
|
12 REL="UP"
|
|
13 TITLE="Video"
|
|
14 HREF="video.html"><LINK
|
|
15 REL="PREVIOUS"
|
|
16 TITLE="SDL_BlitSurface"
|
|
17 HREF="sdlblitsurface.html"><LINK
|
|
18 REL="NEXT"
|
|
19 TITLE="SDL_DisplayFormat"
|
|
20 HREF="sdldisplayformat.html"></HEAD
|
|
21 ><BODY
|
|
22 CLASS="REFENTRY"
|
|
23 BGCOLOR="#FFF8DC"
|
|
24 TEXT="#000000"
|
|
25 LINK="#0000ee"
|
|
26 VLINK="#551a8b"
|
|
27 ALINK="#ff0000"
|
|
28 ><DIV
|
|
29 CLASS="NAVHEADER"
|
|
30 ><TABLE
|
|
31 WIDTH="100%"
|
|
32 BORDER="0"
|
|
33 CELLPADDING="0"
|
|
34 CELLSPACING="0"
|
|
35 ><TR
|
|
36 ><TH
|
|
37 COLSPAN="3"
|
|
38 ALIGN="center"
|
|
39 >SDL Library Documentation</TH
|
|
40 ></TR
|
|
41 ><TR
|
|
42 ><TD
|
|
43 WIDTH="10%"
|
|
44 ALIGN="left"
|
|
45 VALIGN="bottom"
|
|
46 ><A
|
|
47 HREF="sdlblitsurface.html"
|
|
48 >Prev</A
|
|
49 ></TD
|
|
50 ><TD
|
|
51 WIDTH="80%"
|
|
52 ALIGN="center"
|
|
53 VALIGN="bottom"
|
|
54 ></TD
|
|
55 ><TD
|
|
56 WIDTH="10%"
|
|
57 ALIGN="right"
|
|
58 VALIGN="bottom"
|
|
59 ><A
|
|
60 HREF="sdldisplayformat.html"
|
|
61 >Next</A
|
|
62 ></TD
|
|
63 ></TR
|
|
64 ></TABLE
|
|
65 ><HR
|
|
66 ALIGN="LEFT"
|
|
67 WIDTH="100%"></DIV
|
|
68 ><H1
|
|
69 ><A
|
|
70 NAME="SDLFILLRECT"
|
|
71 >SDL_FillRect</A
|
|
72 ></H1
|
|
73 ><DIV
|
|
74 CLASS="REFNAMEDIV"
|
|
75 ><A
|
|
76 NAME="AEN1858"
|
|
77 ></A
|
|
78 ><H2
|
|
79 >Name</H2
|
|
80 >SDL_FillRect -- This function performs a fast fill of the given rectangle with some color</DIV
|
|
81 ><DIV
|
|
82 CLASS="REFSYNOPSISDIV"
|
|
83 ><A
|
|
84 NAME="AEN1861"
|
|
85 ></A
|
|
86 ><H2
|
|
87 >Synopsis</H2
|
|
88 ><DIV
|
|
89 CLASS="FUNCSYNOPSIS"
|
|
90 ><A
|
|
91 NAME="AEN1862"
|
|
92 ></A
|
|
93 ><P
|
|
94 ></P
|
|
95 ><PRE
|
|
96 CLASS="FUNCSYNOPSISINFO"
|
|
97 >#include "SDL.h"</PRE
|
|
98 ><P
|
|
99 ><CODE
|
|
100 ><CODE
|
|
101 CLASS="FUNCDEF"
|
|
102 >int <B
|
|
103 CLASS="FSFUNC"
|
|
104 >SDL_FillRect</B
|
|
105 ></CODE
|
|
106 >(SDL_Surface *dst, SDL_Rect *dstrect, Uint32 color);</CODE
|
|
107 ></P
|
|
108 ><P
|
|
109 ></P
|
|
110 ></DIV
|
|
111 ></DIV
|
|
112 ><DIV
|
|
113 CLASS="REFSECT1"
|
|
114 ><A
|
|
115 NAME="AEN1868"
|
|
116 ></A
|
|
117 ><H2
|
|
118 >Description</H2
|
|
119 ><P
|
|
120 >This function performs a fast fill of the given rectangle with
|
|
121 <TT
|
|
122 CLASS="PARAMETER"
|
|
123 ><I
|
|
124 >color</I
|
|
125 ></TT
|
|
126 >. If <TT
|
|
127 CLASS="PARAMETER"
|
|
128 ><I
|
|
129 >dstrect</I
|
|
130 ></TT
|
|
131 >
|
|
132 is <TT
|
|
133 CLASS="LITERAL"
|
|
134 >NULL</TT
|
|
135 >, the whole surface will be filled with
|
|
136 <TT
|
|
137 CLASS="PARAMETER"
|
|
138 ><I
|
|
139 >color</I
|
|
140 ></TT
|
|
141 >.</P
|
|
142 ><P
|
|
143 >The color should be a pixel of the format used by the surface, and
|
|
144 can be generated by the
|
|
145 <A
|
|
146 HREF="sdlmaprgb.html"
|
|
147 >SDL_MapRGB</A
|
|
148 >
|
|
149 function.</P
|
|
150 ><P
|
|
151 >If there is a clip rectangle set on the destination (set via
|
|
152 <A
|
|
153 HREF="sdlsetcliprect.html"
|
|
154 >SDL_SetClipRect</A
|
|
155 >) then this
|
|
156 function will clip based on the intersection of the clip rectangle and
|
|
157 the <TT
|
|
158 CLASS="PARAMETER"
|
|
159 ><I
|
|
160 >dstrect</I
|
|
161 ></TT
|
|
162 > rectangle.</P
|
|
163 ></DIV
|
|
164 ><DIV
|
|
165 CLASS="REFSECT1"
|
|
166 ><A
|
|
167 NAME="AEN1880"
|
|
168 ></A
|
|
169 ><H2
|
|
170 >Return Value</H2
|
|
171 ><P
|
|
172 >This function returns <SPAN
|
|
173 CLASS="RETURNVALUE"
|
|
174 >0</SPAN
|
|
175 > on success, or
|
|
176 <SPAN
|
|
177 CLASS="RETURNVALUE"
|
|
178 >-1</SPAN
|
|
179 > on error.</P
|
|
180 ></DIV
|
|
181 ><DIV
|
|
182 CLASS="REFSECT1"
|
|
183 ><A
|
|
184 NAME="AEN1885"
|
|
185 ></A
|
|
186 ><H2
|
|
187 >See Also</H2
|
|
188 ><P
|
|
189 ><A
|
|
190 HREF="sdlmaprgb.html"
|
|
191 ><TT
|
|
192 CLASS="FUNCTION"
|
|
193 >SDL_MapRGB</TT
|
|
194 ></A
|
|
195 >,
|
|
196 <A
|
|
197 HREF="sdlblitsurface.html"
|
|
198 ><TT
|
|
199 CLASS="FUNCTION"
|
|
200 >SDL_BlitSurface</TT
|
|
201 ></A
|
|
202 >,
|
|
203 <A
|
|
204 HREF="sdlrect.html"
|
|
205 ><SPAN
|
|
206 CLASS="STRUCTNAME"
|
|
207 >SDL_Rect</SPAN
|
|
208 ></A
|
|
209 ></P
|
|
210 ></DIV
|
|
211 ><DIV
|
|
212 CLASS="NAVFOOTER"
|
|
213 ><HR
|
|
214 ALIGN="LEFT"
|
|
215 WIDTH="100%"><TABLE
|
|
216 WIDTH="100%"
|
|
217 BORDER="0"
|
|
218 CELLPADDING="0"
|
|
219 CELLSPACING="0"
|
|
220 ><TR
|
|
221 ><TD
|
|
222 WIDTH="33%"
|
|
223 ALIGN="left"
|
|
224 VALIGN="top"
|
|
225 ><A
|
|
226 HREF="sdlblitsurface.html"
|
|
227 >Prev</A
|
|
228 ></TD
|
|
229 ><TD
|
|
230 WIDTH="34%"
|
|
231 ALIGN="center"
|
|
232 VALIGN="top"
|
|
233 ><A
|
|
234 HREF="index.html"
|
|
235 >Home</A
|
|
236 ></TD
|
|
237 ><TD
|
|
238 WIDTH="33%"
|
|
239 ALIGN="right"
|
|
240 VALIGN="top"
|
|
241 ><A
|
|
242 HREF="sdldisplayformat.html"
|
|
243 >Next</A
|
|
244 ></TD
|
|
245 ></TR
|
|
246 ><TR
|
|
247 ><TD
|
|
248 WIDTH="33%"
|
|
249 ALIGN="left"
|
|
250 VALIGN="top"
|
|
251 >SDL_BlitSurface</TD
|
|
252 ><TD
|
|
253 WIDTH="34%"
|
|
254 ALIGN="center"
|
|
255 VALIGN="top"
|
|
256 ><A
|
|
257 HREF="video.html"
|
|
258 >Up</A
|
|
259 ></TD
|
|
260 ><TD
|
|
261 WIDTH="33%"
|
|
262 ALIGN="right"
|
|
263 VALIGN="top"
|
|
264 >SDL_DisplayFormat</TD
|
|
265 ></TR
|
|
266 ></TABLE
|
|
267 ></DIV
|
|
268 ></BODY
|
|
269 ></HTML
|
|
270 > |