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