app_server: implement setting BAffineTransforms in BPicture
* Add a simple callback for the picture command
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright 2001-2010, Haiku.
|
||||
* Copyright 2001-2015, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
* Marc Flerackers ([email protected])
|
||||
* Stefano Ceccherini ([email protected])
|
||||
* Marcus Overhagen <[email protected]>
|
||||
* Julian Harnath <[email protected]>
|
||||
*/
|
||||
|
||||
#include "ServerPicture.h"
|
||||
@@ -372,6 +373,7 @@ fill_ellipse(Canvas* canvas, BPoint center, BPoint radii)
|
||||
{
|
||||
BRect rect(center.x - radii.x, center.y - radii.y,
|
||||
center.x + radii.x - 1, center.y + radii.y - 1);
|
||||
|
||||
canvas->PenToScreenTransform().Apply(&rect);
|
||||
canvas->GetDrawingEngine()->DrawEllipse(rect, true);
|
||||
}
|
||||
@@ -775,6 +777,13 @@ set_blending_mode(Canvas* canvas, int16 alphaSrcMode, int16 alphaFncMode)
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_transform(Canvas* canvas, BAffineTransform transform)
|
||||
{
|
||||
canvas->CurrentState()->SetTransform(transform);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
reserved()
|
||||
{
|
||||
@@ -829,7 +838,8 @@ const static void* kTableEntries[] = {
|
||||
(const void*)set_font_shear,
|
||||
(const void*)reserved, // 45
|
||||
(const void*)set_font_face,
|
||||
(const void*)set_blending_mode // 47
|
||||
(const void*)set_blending_mode,
|
||||
(const void*)set_transform // 48
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user