added part of a patch by Lukasz Zemczak which adds ellipse
filling/stroking support to BPictures. Thank you!" git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19102 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -119,16 +119,20 @@ fill_arc(ViewLayer *view, BPoint center, BPoint radii, float startTheta,
|
|||||||
static void
|
static void
|
||||||
stroke_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
stroke_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
||||||
{
|
{
|
||||||
/*view->ConvertToScreenForDrawing(&rect);
|
BRect rect(center.x - radii.x, center.y - radii.y, center.x + radii.x,
|
||||||
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), false);*/
|
center.y + radii.y);
|
||||||
|
view->ConvertToScreenForDrawing(&rect);
|
||||||
|
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fill_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
fill_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
||||||
{
|
{
|
||||||
/*view->ConvertToScreenForDrawing(&rect);
|
BRect rect(center.x - radii.x, center.y - radii.y, center.x + radii.x,
|
||||||
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), true);*/
|
center.y + radii.y);
|
||||||
|
view->ConvertToScreenForDrawing(&rect);
|
||||||
|
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2415,7 +2415,18 @@ ServerWindow::_DispatchPictureMessage(int32 code, BPrivate::LinkReceiver &link)
|
|||||||
picture->EndOp();
|
picture->EndOp();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case AS_STROKE_ELLIPSE:
|
||||||
|
case AS_FILL_ELLIPSE:
|
||||||
|
{
|
||||||
|
BRect rect;
|
||||||
|
link.Read<BRect>(&rect);
|
||||||
|
picture->BeginOp(code == AS_FILL_ELLIPSE ? B_PIC_FILL_ELLIPSE :
|
||||||
|
B_PIC_STROKE_ELLIPSE);
|
||||||
|
picture->AddRect(rect);
|
||||||
|
picture->EndOp();
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case AS_STROKE_LINE:
|
case AS_STROKE_LINE:
|
||||||
{
|
{
|
||||||
float x1, y1, x2, y2;
|
float x1, y1, x2, y2;
|
||||||
|
|||||||
Reference in New Issue
Block a user