update dox for setLooper()

update some { } styles



git-svn-id: http://skia.googlecode.com/svn/trunk@948 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@google.com 2011-03-16 20:02:59 +00:00
parent b52bb9b2cb
commit 9d07fec374

View File

@ -57,8 +57,7 @@ public:
SkPaint& operator=(const SkPaint&);
SK_API friend int operator==(const SkPaint& a, const SkPaint& b);
friend int operator!=(const SkPaint& a, const SkPaint& b)
{
friend int operator!=(const SkPaint& a, const SkPaint& b) {
return !(a == b);
}
@ -86,13 +85,11 @@ public:
kFull_Hinting = 3,
};
Hinting getHinting() const
{
Hinting getHinting() const {
return static_cast<Hinting>(fHinting);
}
void setHinting(Hinting hintingLevel)
{
void setHinting(Hinting hintingLevel) {
fHinting = hintingLevel;
}
@ -130,8 +127,7 @@ public:
/** Helper for getFlags(), returning true if kAntiAlias_Flag bit is set
@return true if the antialias bit is set in the paint's flags.
*/
bool isAntiAlias() const
{
bool isAntiAlias() const {
return SkToBool(this->getFlags() & kAntiAlias_Flag);
}
@ -143,8 +139,7 @@ public:
/** Helper for getFlags(), returning true if kDither_Flag bit is set
@return true if the dithering bit is set in the paint's flags.
*/
bool isDither() const
{
bool isDither() const {
return SkToBool(this->getFlags() & kDither_Flag);
}
@ -156,8 +151,7 @@ public:
/** Helper for getFlags(), returning true if kLinearText_Flag bit is set
@return true if the lineartext bit is set in the paint's flags
*/
bool isLinearText() const
{
bool isLinearText() const {
return SkToBool(this->getFlags() & kLinearText_Flag);
}
@ -170,8 +164,7 @@ public:
/** Helper for getFlags(), returning true if kSubpixelText_Flag bit is set
@return true if the lineartext bit is set in the paint's flags
*/
bool isSubpixelText() const
{
bool isSubpixelText() const {
return SkToBool(this->getFlags() & kSubpixelText_Flag);
}
@ -181,8 +174,7 @@ public:
*/
void setSubpixelText(bool subpixelText);
bool isLCDRenderText() const
{
bool isLCDRenderText() const {
return SkToBool(this->getFlags() & kLCDRenderText_Flag);
}
@ -192,8 +184,7 @@ public:
*/
void setLCDRenderText(bool subpixelRender);
bool isEmbeddedBitmapText() const
{
bool isEmbeddedBitmapText() const {
return SkToBool(this->getFlags() & kEmbeddedBitmapText_Flag);
}
@ -203,8 +194,7 @@ public:
*/
void setEmbeddedBitmapText(bool useEmbeddedBitmapText);
bool isAutohinted() const
{
bool isAutohinted() const {
return SkToBool(this->getFlags() & kAutoHinting_Flag);
}
@ -218,8 +208,7 @@ public:
/** Helper for getFlags(), returning true if kUnderlineText_Flag bit is set
@return true if the underlineText bit is set in the paint's flags.
*/
bool isUnderlineText() const
{
bool isUnderlineText() const {
return SkToBool(this->getFlags() & kUnderlineText_Flag);
}
@ -232,8 +221,7 @@ public:
/** Helper for getFlags(), returns true if kStrikeThruText_Flag bit is set
@return true if the strikeThruText bit is set in the paint's flags.
*/
bool isStrikeThruText() const
{
bool isStrikeThruText() const {
return SkToBool(this->getFlags() & kStrikeThruText_Flag);
}
@ -246,8 +234,7 @@ public:
/** Helper for getFlags(), returns true if kFakeBoldText_Flag bit is set
@return true if the kFakeBoldText_Flag bit is set in the paint's flags.
*/
bool isFakeBoldText() const
{
bool isFakeBoldText() const {
return SkToBool(this->getFlags() & kFakeBoldText_Flag);
}
@ -260,8 +247,7 @@ public:
/** Helper for getFlags(), returns true if kDevKernText_Flag bit is set
@return true if the kernText bit is set in the paint's flags.
*/
bool isDevKernText() const
{
bool isDevKernText() const {
return SkToBool(this->getFlags() & kDevKernText_Flag);
}
@ -271,8 +257,7 @@ public:
*/
void setDevKernText(bool devKernText);
bool isFilterBitmap() const
{
bool isFilterBitmap() const {
return SkToBool(this->getFlags() & kFilterBitmap_Flag);
}
@ -613,8 +598,24 @@ public:
*/
SkRasterizer* setRasterizer(SkRasterizer* rasterizer);
/**
* Return the paint's SkDrawLooper (if any). Does not affect the looper's
* reference count.
*/
SkDrawLooper* getLooper() const { return fLooper; }
SkDrawLooper* setLooper(SkDrawLooper*);
/**
* Set or clear the looper object.
* <p />
* Pass NULL to clear any previous looper.
* As a convenience, the parameter passed is also returned.
* If a previous looper exists in the paint, its reference count is
* decremented. If looper is not NULL, its reference count is
* incremented.
* @param looper May be NULL. The new looper to be installed in the paint.
* @return looper
*/
SkDrawLooper* setLooper(SkDrawLooper* looper);
enum Align {
kLeft_Align,
@ -623,10 +624,12 @@ public:
kAlignCount
};
/** Return the paint's Align value for drawing text.
@return the paint's Align value for drawing text.
*/
Align getTextAlign() const { return (Align)fTextAlign; }
/** Set the paint's text alignment.
@param align set the paint's Align value for drawing text.
*/
@ -677,10 +680,7 @@ public:
kGlyphID_TextEncoding //!< the text parameters are glyph indices
};
TextEncoding getTextEncoding() const
{
return (TextEncoding)fTextEncoding;
}
TextEncoding getTextEncoding() const { return (TextEncoding)fTextEncoding; }
void setTextEncoding(TextEncoding encoding);
@ -742,8 +742,7 @@ public:
want to have the text converted into glyph IDs, call textToGlyphs
instead.
*/
int countText(const void* text, size_t byteLength) const
{
int countText(const void* text, size_t byteLength) const {
return this->textToGlyphs(text, byteLength, NULL);
}
@ -756,16 +755,15 @@ public:
by this value
@return The advance width of the text
*/
SkScalar measureText(const void* text, size_t length,
SkRect* bounds, SkScalar scale = 0) const;
SkScalar measureText(const void* text, size_t length,
SkRect* bounds, SkScalar scale = 0) const;
/** Return the width of the text.
@param text Address of the text
@param length Number of bytes of text to measure
@return The width of the text
*/
SkScalar measureText(const void* text, size_t length) const
{
SkScalar measureText(const void* text, size_t length) const {
return this->measureText(text, length, NULL, 0);
}