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:
parent
bd211ce7df
commit
dbb1345583
1 changed files with 3 additions and 19 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue