1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-06 04:00:08 +00:00

Replaced calls to CGContextSetRGBStrokeColor with a path-based alternative due to strange iOS bugs

This commit is contained in:
jules 2018-09-24 10:26:43 +01:00
parent bd211ce7df
commit dbb1345583

View file

@ -548,25 +548,9 @@ void CoreGraphicsContext::drawImage (const Image& sourceImage, const AffineTrans
//==============================================================================
void CoreGraphicsContext::drawLine (const Line<float>& line)
{
if (state->fillType.isColour())
{
CGContextSetLineCap (context, kCGLineCapSquare);
CGContextSetLineWidth (context, 1.0f);
CGContextSetRGBStrokeColor (context,
state->fillType.colour.getFloatRed(), state->fillType.colour.getFloatGreen(),
state->fillType.colour.getFloatBlue(), state->fillType.colour.getFloatAlpha());
CGPoint cgLine[] = { { (CGFloat) line.getStartX(), flipHeight - (CGFloat) line.getStartY() },
{ (CGFloat) line.getEndX(), flipHeight - (CGFloat) line.getEndY() } };
CGContextStrokeLineSegments (context, cgLine, 1);
}
else
{
Path p;
p.addLineSegment (line, 1.0f);
fillPath (p, AffineTransform());
}
Path p;
p.addLineSegment (line, 1.0f);
fillPath (p, {});
}
void CoreGraphicsContext::fillRectList (const RectangleList<float>& list)