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:
parent
04c67ff9bf
commit
0c40a6370e
@ -119,16 +119,20 @@ fill_arc(ViewLayer *view, BPoint center, BPoint radii, float startTheta,
|
||||
static void
|
||||
stroke_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
||||
{
|
||||
/*view->ConvertToScreenForDrawing(&rect);
|
||||
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), false);*/
|
||||
BRect rect(center.x - radii.x, center.y - radii.y, center.x + radii.x,
|
||||
center.y + radii.y);
|
||||
view->ConvertToScreenForDrawing(&rect);
|
||||
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), false);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
fill_ellipse(ViewLayer *view, BPoint center, BPoint radii)
|
||||
{
|
||||
/*view->ConvertToScreenForDrawing(&rect);
|
||||
view->Window()->GetDrawingEngine()->DrawEllipse(rect, view->CurrentState(), true);*/
|
||||
BRect rect(center.x - radii.x, center.y - radii.y, center.x + radii.x,
|
||||
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();
|
||||
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:
|
||||
{
|
||||
float x1, y1, x2, y2;
|
||||
|
Loading…
Reference in New Issue
Block a user