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:
parent
b52bb9b2cb
commit
9d07fec374
@ -57,8 +57,7 @@ public:
|
|||||||
SkPaint& operator=(const SkPaint&);
|
SkPaint& operator=(const SkPaint&);
|
||||||
|
|
||||||
SK_API friend int operator==(const SkPaint& a, const SkPaint& b);
|
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);
|
return !(a == b);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -86,13 +85,11 @@ public:
|
|||||||
kFull_Hinting = 3,
|
kFull_Hinting = 3,
|
||||||
};
|
};
|
||||||
|
|
||||||
Hinting getHinting() const
|
Hinting getHinting() const {
|
||||||
{
|
|
||||||
return static_cast<Hinting>(fHinting);
|
return static_cast<Hinting>(fHinting);
|
||||||
}
|
}
|
||||||
|
|
||||||
void setHinting(Hinting hintingLevel)
|
void setHinting(Hinting hintingLevel) {
|
||||||
{
|
|
||||||
fHinting = hintingLevel;
|
fHinting = hintingLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -130,8 +127,7 @@ public:
|
|||||||
/** Helper for getFlags(), returning true if kAntiAlias_Flag bit is set
|
/** Helper for getFlags(), returning true if kAntiAlias_Flag bit is set
|
||||||
@return true if the antialias bit is set in the paint's flags.
|
@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);
|
return SkToBool(this->getFlags() & kAntiAlias_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -143,8 +139,7 @@ public:
|
|||||||
/** Helper for getFlags(), returning true if kDither_Flag bit is set
|
/** Helper for getFlags(), returning true if kDither_Flag bit is set
|
||||||
@return true if the dithering bit is set in the paint's flags.
|
@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);
|
return SkToBool(this->getFlags() & kDither_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -156,8 +151,7 @@ public:
|
|||||||
/** Helper for getFlags(), returning true if kLinearText_Flag bit is set
|
/** Helper for getFlags(), returning true if kLinearText_Flag bit is set
|
||||||
@return true if the lineartext bit is set in the paint's flags
|
@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);
|
return SkToBool(this->getFlags() & kLinearText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -170,8 +164,7 @@ public:
|
|||||||
/** Helper for getFlags(), returning true if kSubpixelText_Flag bit is set
|
/** Helper for getFlags(), returning true if kSubpixelText_Flag bit is set
|
||||||
@return true if the lineartext bit is set in the paint's flags
|
@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);
|
return SkToBool(this->getFlags() & kSubpixelText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,8 +174,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setSubpixelText(bool subpixelText);
|
void setSubpixelText(bool subpixelText);
|
||||||
|
|
||||||
bool isLCDRenderText() const
|
bool isLCDRenderText() const {
|
||||||
{
|
|
||||||
return SkToBool(this->getFlags() & kLCDRenderText_Flag);
|
return SkToBool(this->getFlags() & kLCDRenderText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -192,8 +184,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setLCDRenderText(bool subpixelRender);
|
void setLCDRenderText(bool subpixelRender);
|
||||||
|
|
||||||
bool isEmbeddedBitmapText() const
|
bool isEmbeddedBitmapText() const {
|
||||||
{
|
|
||||||
return SkToBool(this->getFlags() & kEmbeddedBitmapText_Flag);
|
return SkToBool(this->getFlags() & kEmbeddedBitmapText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -203,8 +194,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setEmbeddedBitmapText(bool useEmbeddedBitmapText);
|
void setEmbeddedBitmapText(bool useEmbeddedBitmapText);
|
||||||
|
|
||||||
bool isAutohinted() const
|
bool isAutohinted() const {
|
||||||
{
|
|
||||||
return SkToBool(this->getFlags() & kAutoHinting_Flag);
|
return SkToBool(this->getFlags() & kAutoHinting_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -218,8 +208,7 @@ public:
|
|||||||
/** Helper for getFlags(), returning true if kUnderlineText_Flag bit is set
|
/** Helper for getFlags(), returning true if kUnderlineText_Flag bit is set
|
||||||
@return true if the underlineText bit is set in the paint's flags.
|
@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);
|
return SkToBool(this->getFlags() & kUnderlineText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -232,8 +221,7 @@ public:
|
|||||||
/** Helper for getFlags(), returns true if kStrikeThruText_Flag bit is set
|
/** Helper for getFlags(), returns true if kStrikeThruText_Flag bit is set
|
||||||
@return true if the strikeThruText bit is set in the paint's flags.
|
@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);
|
return SkToBool(this->getFlags() & kStrikeThruText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,8 +234,7 @@ public:
|
|||||||
/** Helper for getFlags(), returns true if kFakeBoldText_Flag bit is set
|
/** 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.
|
@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);
|
return SkToBool(this->getFlags() & kFakeBoldText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,8 +247,7 @@ public:
|
|||||||
/** Helper for getFlags(), returns true if kDevKernText_Flag bit is set
|
/** Helper for getFlags(), returns true if kDevKernText_Flag bit is set
|
||||||
@return true if the kernText bit is set in the paint's flags.
|
@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);
|
return SkToBool(this->getFlags() & kDevKernText_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -271,8 +257,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
void setDevKernText(bool devKernText);
|
void setDevKernText(bool devKernText);
|
||||||
|
|
||||||
bool isFilterBitmap() const
|
bool isFilterBitmap() const {
|
||||||
{
|
|
||||||
return SkToBool(this->getFlags() & kFilterBitmap_Flag);
|
return SkToBool(this->getFlags() & kFilterBitmap_Flag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -613,8 +598,24 @@ public:
|
|||||||
*/
|
*/
|
||||||
SkRasterizer* setRasterizer(SkRasterizer* rasterizer);
|
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* 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 {
|
enum Align {
|
||||||
kLeft_Align,
|
kLeft_Align,
|
||||||
@ -623,10 +624,12 @@ public:
|
|||||||
|
|
||||||
kAlignCount
|
kAlignCount
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Return the paint's Align value for drawing text.
|
/** Return the paint's Align value for drawing text.
|
||||||
@return the paint's Align value for drawing text.
|
@return the paint's Align value for drawing text.
|
||||||
*/
|
*/
|
||||||
Align getTextAlign() const { return (Align)fTextAlign; }
|
Align getTextAlign() const { return (Align)fTextAlign; }
|
||||||
|
|
||||||
/** Set the paint's text alignment.
|
/** Set the paint's text alignment.
|
||||||
@param align set the paint's Align value for drawing text.
|
@param align set the paint's Align value for drawing text.
|
||||||
*/
|
*/
|
||||||
@ -677,10 +680,7 @@ public:
|
|||||||
kGlyphID_TextEncoding //!< the text parameters are glyph indices
|
kGlyphID_TextEncoding //!< the text parameters are glyph indices
|
||||||
};
|
};
|
||||||
|
|
||||||
TextEncoding getTextEncoding() const
|
TextEncoding getTextEncoding() const { return (TextEncoding)fTextEncoding; }
|
||||||
{
|
|
||||||
return (TextEncoding)fTextEncoding;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setTextEncoding(TextEncoding encoding);
|
void setTextEncoding(TextEncoding encoding);
|
||||||
|
|
||||||
@ -742,8 +742,7 @@ public:
|
|||||||
want to have the text converted into glyph IDs, call textToGlyphs
|
want to have the text converted into glyph IDs, call textToGlyphs
|
||||||
instead.
|
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);
|
return this->textToGlyphs(text, byteLength, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -756,16 +755,15 @@ public:
|
|||||||
by this value
|
by this value
|
||||||
@return The advance width of the text
|
@return The advance width of the text
|
||||||
*/
|
*/
|
||||||
SkScalar measureText(const void* text, size_t length,
|
SkScalar measureText(const void* text, size_t length,
|
||||||
SkRect* bounds, SkScalar scale = 0) const;
|
SkRect* bounds, SkScalar scale = 0) const;
|
||||||
|
|
||||||
/** Return the width of the text.
|
/** Return the width of the text.
|
||||||
@param text Address of the text
|
@param text Address of the text
|
||||||
@param length Number of bytes of text to measure
|
@param length Number of bytes of text to measure
|
||||||
@return The width of the text
|
@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);
|
return this->measureText(text, length, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user