Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions builtins/libAfterImage/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,7 @@ asim_ellips2( ASDrawContext *ctx, int x, int y, int rx, int ry, int angle, Bool
{
double d ;
int dx1 = 0, dx2 = 0 ;
int fill_edge = -1 ;
d = A*(double)x1*(double)x1 + BB +CC*(double)x1;
#ifdef DEBUG_ELLIPS
fprintf( stderr, "line = %d, d1 = %f", y-line, d );
Expand Down Expand Up @@ -1634,6 +1635,7 @@ asim_ellips2( ASDrawContext *ctx, int x, int y, int rx, int ry, int angle, Bool
dd += aa ;
}
x2 += (dx2>>1)-1 ;
fill_edge = 1 ;
last_med_dd2 = med_dd ;
}
}else if( line < yr )
Expand Down Expand Up @@ -1699,8 +1701,8 @@ asim_ellips2( ASDrawContext *ctx, int x, int y, int rx, int ry, int angle, Bool
#endif
if( fill )
{
CTX_FILL_HLINE(ctx,x+(x1-2),y-y1,x+x2-1,255);
CTX_FILL_HLINE(ctx,x-x2-1,y+y1,x-(x1-2),255);
CTX_FILL_HLINE(ctx,x+(x1-2),y-y1,x+(x2+fill_edge),255);
CTX_FILL_HLINE(ctx,x-(x2+fill_edge),y+y1,x-(x1-2),255);
}

CC -= 2.*C ;
Expand Down
3 changes: 0 additions & 3 deletions graf2d/asimage/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,3 @@
# For the list of contributors see $ROOTSYS/README/CREDITS.

ROOT_ADD_GTEST(TASImageDraw tasimage_draw.cxx LIBRARIES ASImage)

# add failing test until fixed
ROOT_ADD_GTEST(TASImageDrawEllipse tasimage_ellipse_draw.cxx WILLFAIL LIBRARIES ASImage)
13 changes: 7 additions & 6 deletions graf2d/asimage/test/tasimage_draw.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -169,22 +169,24 @@ TEST(TASImage, FillePolygonLowAlpha)
CheckFilledShapeStaysInside("#100000FF", 2);
}

/*

// comment out all ellpse test while they are failing
// https://github.com/root-project/root/issues/23120
//
// asim_ellips2 walks a tilted ellipse one scanline pair at a time and exploits
// the 180 degree rotational symmetry, so the two spans it fills per iteration
// must mirror each other. The right edge was one pixel short of its partner,
// which left unfilled pixels along the tilted boundary. The point checked below
// sits inside the ellipse and used to stay empty.

TEST(TASImage, FilledEllipsOpaque)
{
CheckFilledShapeStaysInside("#FF2277CC", 3);
}

// Used to leak out of the circle and fill the whole image.
TEST(TASImage, FilledEllipsHighAlpha)
{
CheckFilledShapeStaysInside("#C02277CC", 3);
}

// Used to hang: the colour from the issue report.
TEST(TASImage, FilledEllipsSemiTransparent)
{
CheckFilledShapeStaysInside("#7F2277CC", 3);
Expand All @@ -194,4 +196,3 @@ TEST(TASImage, FilleEllipsLowAlpha)
{
CheckFilledShapeStaysInside("#102277CC", 3);
}
*/
116 changes: 0 additions & 116 deletions graf2d/asimage/test/tasimage_ellipse_draw.cxx

This file was deleted.

Loading