freetype: initial import @ 4e2b158
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
0d2675507d
commit
b50dade2fd
20 changed files with 2252 additions and 0 deletions
22
freetype/src/Outline.zig
Normal file
22
freetype/src/Outline.zig
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
const c = @import("c.zig");
|
||||
const types = @import("types.zig");
|
||||
|
||||
const Outline = @This();
|
||||
|
||||
handle: c.FT_Outline,
|
||||
|
||||
pub fn init(handle: c.FT_Outline) Outline {
|
||||
return Outline{ .handle = handle };
|
||||
}
|
||||
|
||||
pub fn points(self: Outline) []const types.Vector {
|
||||
return self.handle.points[0..@intCast(u15, self.handle.n_points)];
|
||||
}
|
||||
|
||||
pub fn tags(self: Outline) []const u8 {
|
||||
return self.handle.tags[0..@intCast(u15, self.handle.n_points)];
|
||||
}
|
||||
|
||||
pub fn contours(self: Outline) []const i16 {
|
||||
return self.handle.contours[0..@intCast(u15, self.handle.n_contours)];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue