Added WIP support for affine transformations to BViews.

Everything untested, but compiles, so it must work. The idea is to introduce
BAffineTransform additionally to the existing Origin and Scale properties of
BViews. One may use it in parallel or as an alternative. Painter in app_server
is not yet aware of the additional transformation. It is however already used
to transform drawing coordinates. It probably needs to work differently,
perhaps only in Painter and AGGTextRenderer.
This commit is contained in:
Stephan Aßmus
2014-02-04 22:53:06 +01:00
parent 339a018112
commit a6db6bd40f
12 changed files with 258 additions and 61 deletions
+6 -3
View File
@@ -39,8 +39,9 @@ enum {
B_VIEW_LOW_COLOR_BIT = 0x00008000,
B_VIEW_VIEW_COLOR_BIT = 0x00010000,
B_VIEW_PATTERN_BIT = 0x00020000,
B_VIEW_TRANSFORM_BIT = 0x00040000,
B_VIEW_ALL_BITS = 0x0003ffff,
B_VIEW_ALL_BITS = 0x0007ffff,
// these used for archiving only
B_VIEW_RESIZE_BIT = 0x00001000,
@@ -111,7 +112,11 @@ class ViewState {
::drawing_mode drawing_mode;
BRegion clipping_region;
bool clipping_region_used;
// transformation
BPoint origin;
float scale;
BAffineTransform transform;
// line modes
join_mode line_join;
@@ -122,8 +127,6 @@ class ViewState {
source_alpha alpha_source_mode;
alpha_function alpha_function_mode;
float scale;
// fonts
BFont font;
uint16 font_flags;