macos: frames, attributed strings, stylized strings

This commit is contained in:
Mitchell Hashimoto
2022-10-09 08:07:56 -07:00
parent 1e2e4169a5
commit 8b3959dceb
4 changed files with 41 additions and 1 deletions

View File

@@ -22,6 +22,13 @@ pub const Frame = opaque {
@ptrCast(*c.CGPoint, points.ptr),
);
}
pub fn getLines(self: *Frame) *foundation.Array {
return @intToPtr(
*foundation.Array,
@ptrToInt(c.CTFrameGetLines(@ptrCast(c.CTFrameRef, self))),
);
}
};
test {