Wiki Page Content

Differences between revisions 2 and 3
Revision 2 as of 2010-09-27 06:23:47
Size: 1656
Editor: SheenaSmith
Comment: minor change
Revision 3 as of 2010-09-28 04:39:39
Size: 804
Editor: SheenaSmith
Comment: update content (w/ Sam); remove 'draft' note
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 6: Line 5:
Use this function to ^report if a rectangle has no area^.

<<Color2(green,Is this one of those macros that should be labeled as a macro? ie: the above would read "Use this macro to..." instead.)>>
Use this function to check whether a rectangle has no area.
Line 14: Line 11:
SDL_RectEmpty(X)
}}}

<<Color2(green,If this returns a boolean should it show a boolean return value type? If it is referring to a specific rectangle wouldn't that be one of the params? Below is possible alternate syntax.)>>

{{{#!highlight cpp
SDL_bool SDL_RectEmpty(SDL_Rect* rect)
SDL_bool SDL_RectEmpty(const SDL_Rect* rect)
Line 24: Line 15:
||'''X'''||(((X)->w <= 0) || ((X)->h <= 0))||

<<Color2(green,Alt params to go with above alt syntax:)>>
||'''rect'''||the [[SDL_Rect]] to query for size; see [[#Remarks|Remarks]] for details||
||'''rect'''||the [[SDL_Rect]] to check||
Line 30: Line 18:
Returns ^SDL_TRUE^ if the rectangle has no area ^or SDL_FALSE if it does; see [[#Remarks|Remarks]] for details^. Returns SDL_TRUE if the rectangle has no area or SDL_FALSE if it does; see [[#Remarks|Remarks]] for details.
Line 38: Line 26:
''You can add useful comments here'' If the rectangle defined by '''rect''' has an `w` or `h` value <= 0 it has no area and this function returns SDL_TRUE. If both values are > 0 the rectangle has area and this function returns SDL_FALSE.
Line 40: Line 28:
<<Color2(green,There must be a reference to [[SDL_Rect]] here somewhere but I'm not sure where or how to put it. Below is possible text to go with the above alternates.)>>

If the rectangle defined/described by '''rect''' has an `x` or `y` value <=0 it has no area and this function returns SDL_TRUE. If both values are >0 the rectangle has area and this function returns SDL_FALSE.

== Related Functions ==

SDL_RectEmpty

Use this function to check whether a rectangle has no area.

Syntax

SDL_bool SDL_RectEmpty(const SDL_Rect* rect)

Function Parameters

rect

the SDL_Rect to check

Return Value

Returns SDL_TRUE if the rectangle has no area or SDL_FALSE if it does; see Remarks for details.

Code Examples

You can add your code example here

Remarks

If the rectangle defined by rect has an w or h value <= 0 it has no area and this function returns SDL_TRUE. If both values are > 0 the rectangle has area and this function returns SDL_FALSE.


CategoryAPI, CategoryRect

None: SDL_RectEmpty (last edited 2013-08-11 12:23:59 by PhilippWiesemann)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit