coretext: colored glyph rendering

This commit is contained in:
Mitchell Hashimoto
2023-06-30 15:57:59 -07:00
parent 286944cd43
commit a74e49833b
2 changed files with 47 additions and 13 deletions

View File

@@ -101,6 +101,16 @@ pub fn Context(comptime T: type) type {
);
}
pub fn setRGBStrokeColor(self: *T, r: f64, g: f64, b: f64, alpha: f64) void {
c.CGContextSetRGBStrokeColor(
@ptrCast(self),
r,
g,
b,
alpha,
);
}
pub fn setTextDrawingMode(self: *T, mode: TextDrawingMode) void {
c.CGContextSetTextDrawingMode(
@ptrCast(self),