Skip to content

The text is being drawn repeatedly, unnecessarily, making it appear rough.  #1

@sstanleyau-github

Description

@sstanleyau-github

The call to super is in the wrong place. Change:

NSRectFill(topRect);

[super drawGlyphsForGlyphRange:attributeGlyphRange atPoint:origin];
[NSGraphicsContext restoreGraphicsState];
}
else {
[super drawGlyphsForGlyphRange:glyphsToShow atPoint:origin];
}
glyphRange.length = NSMaxRange(glyphRange) - NSMaxRange(attributeGlyphRange);
glyphRange.location = NSMaxRange(attributeGlyphRange);
}
}

To:

        NSRectFill(bottom);

        NSRect topRect = NSMakeRect(NSMinX(boundingRect), NSMinY(boundingRect), NSWidth(boundingRect), 1.0);
        NSRectFill(topRect);

        [NSGraphicsContext restoreGraphicsState];
    }
    glyphRange.length = NSMaxRange(glyphRange) - NSMaxRange(attributeGlyphRange);
    glyphRange.location = NSMaxRange(attributeGlyphRange);
}
        [super drawGlyphsForGlyphRange:glyphsToShow atPoint:origin];

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions