pkg/macos: more stuff

This commit is contained in:
Mitchell Hashimoto
2022-10-10 09:03:03 -07:00
parent c75e54fca0
commit 1e23779337
2 changed files with 8 additions and 0 deletions

View File

@ -19,6 +19,13 @@ pub fn Context(comptime T: type) type {
);
}
pub fn setAllowsAntialiasing(self: *T, v: bool) void {
c.CGContextSetAllowsAntialiasing(
@ptrCast(c.CGContextRef, self),
v,
);
}
pub fn setShouldAntialias(self: *T, v: bool) void {
c.CGContextSetShouldAntialias(
@ptrCast(c.CGContextRef, self),

View File

@ -139,6 +139,7 @@ pub const Face = struct {
);
defer ctx.release();
ctx.setAllowsAntialiasing(false);
ctx.setShouldAntialias(false);
ctx.setShouldSmoothFonts(false);
ctx.setGrayFillColor(1, 1);