Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 38aebb8

Browse files
committed
[[ Bug 19948 ]] Fix LCB sector command
This patch reverts a change made to fix Bug 17969 - moving the fix to the paint tools code in MCImageMutableRep.
1 parent c5e3c3d commit 38aebb8

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

engine/src/image_rep_mutable.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1466,8 +1466,8 @@ MCRectangle MCMutableImageRep::drawoval()
14661466
t_center.y = newrect.y + 0.5 * newrect.height;
14671467

14681468
MCGSize t_radii;
1469-
t_radii.width = newrect.width;
1470-
t_radii.height = newrect.height;
1469+
t_radii.width = newrect.width * 0.5;
1470+
t_radii.height = newrect.height * 0.5;
14711471

14721472
MCGPathRef t_path = nil;
14731473
/* UNCHECKED */ MCGPathCreateMutable(t_path);

libgraphics/src/path.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -488,8 +488,8 @@ void MCGPathAddArc(MCGPathRef self, MCGPoint p_center, MCGSize p_radii, MCGFloat
488488
{
489489
// Use Skia implementation
490490
SkRect t_bounds;
491-
t_bounds = SkRect::MakeXYWH(MCGCoordToSkCoord(p_center . x - (p_radii . width * 0.5f)), MCGCoordToSkCoord(p_center . y - (p_radii . height * 0.5f)),
492-
MCGFloatToSkScalar(p_radii . width), MCGFloatToSkScalar(p_radii . height));
491+
t_bounds = SkRect::MakeXYWH(MCGCoordToSkCoord(p_center . x - p_radii . width), MCGCoordToSkCoord(p_center . y - p_radii . height),
492+
MCGFloatToSkScalar(p_radii . width * 2.0), MCGFloatToSkScalar(p_radii . height * 2.0));
493493
self -> path -> addArc(t_bounds, MCGFloatToSkScalar(p_start_angle), MCGFloatToSkScalar(p_finish_angle - p_start_angle));
494494
}
495495
}

0 commit comments

Comments
 (0)