app_server & interface kit: support fill rules.
* BView gets SetFillRule/FillRule methods. The fill rule is part of the view state. * The B_NONZERO rule is the default. This is what we implemented before. * The B_EVEN_ODD rule is the other common possibility for this, and we need to support it to help WebKit to render properly.
This commit is contained in:
@@ -261,6 +261,14 @@ enum cap_mode {
|
||||
const float B_DEFAULT_MITER_LIMIT = 10.0F;
|
||||
|
||||
|
||||
// Polygon filling rules
|
||||
|
||||
enum {
|
||||
B_EVEN_ODD = 0,
|
||||
B_NONZERO
|
||||
};
|
||||
|
||||
|
||||
// Bitmap and overlay constants
|
||||
|
||||
enum bitmap_tiling {
|
||||
|
||||
@@ -282,6 +282,9 @@ public:
|
||||
cap_mode LineCapMode() const;
|
||||
float LineMiterLimit() const;
|
||||
|
||||
void SetFillRule(int32 rule);
|
||||
int32 FillRule() const;
|
||||
|
||||
void SetOrigin(BPoint pt);
|
||||
void SetOrigin(float x, float y);
|
||||
BPoint Origin() const;
|
||||
|
||||
@@ -345,6 +345,10 @@ enum {
|
||||
AS_VIEW_SET_TRANSFORM,
|
||||
AS_VIEW_GET_TRANSFORM,
|
||||
|
||||
// Polygon filling rules
|
||||
AS_VIEW_SET_FILL_RULE,
|
||||
AS_VIEW_GET_FILL_RULE,
|
||||
|
||||
AS_LAST_CODE
|
||||
};
|
||||
|
||||
|
||||
@@ -40,8 +40,9 @@ enum {
|
||||
B_VIEW_VIEW_COLOR_BIT = 0x00010000,
|
||||
B_VIEW_PATTERN_BIT = 0x00020000,
|
||||
B_VIEW_TRANSFORM_BIT = 0x00040000,
|
||||
B_VIEW_FILL_RULE_BIT = 0x00080000,
|
||||
|
||||
B_VIEW_ALL_BITS = 0x0007ffff,
|
||||
B_VIEW_ALL_BITS = 0x000fffff,
|
||||
|
||||
// these used for archiving only
|
||||
B_VIEW_RESIZE_BIT = 0x00001000,
|
||||
@@ -123,6 +124,9 @@ class ViewState {
|
||||
cap_mode line_cap;
|
||||
float miter_limit;
|
||||
|
||||
// fill rule
|
||||
int32 fill_rule;
|
||||
|
||||
// alpha blending
|
||||
source_alpha alpha_source_mode;
|
||||
alpha_function alpha_function_mode;
|
||||
|
||||
Reference in New Issue
Block a user