Skip to content

Commit

Permalink
Add missing cairo.textPath
Browse files Browse the repository at this point in the history
  • Loading branch information
jgranick committed Feb 23, 2017
1 parent 0fff8de commit c04f574
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions lime/_backend/native/NativeCFFI.hx
Expand Up @@ -345,6 +345,7 @@ class NativeCFFI {
@:cffi private static function lime_cairo_stroke (handle:CFFIPointer):Void;
@:cffi private static function lime_cairo_stroke_extents (handle:CFFIPointer, x1:Float, y1:Float, x2:Float, y2:Float):Void;
@:cffi private static function lime_cairo_stroke_preserve (handle:CFFIPointer):Void;
@:cffi private static function lime_cairo_text_path (handle:CFFIPointer, text:String):Void;
@:cffi private static function lime_cairo_transform (handle:CFFIPointer, matrix:Dynamic):Void;
@:cffi private static function lime_cairo_translate (handle:CFFIPointer, x:Float, y:Float):Void;
@:cffi private static function lime_cairo_version ():Int;
Expand Down
9 changes: 9 additions & 0 deletions lime/graphics/cairo/Cairo.hx
Expand Up @@ -472,6 +472,15 @@ class Cairo {
}


public function textPath (utf8:String):Void {

#if (lime_cffi && lime_cairo && !macro)
NativeCFFI.lime_cairo_text_path (handle, utf8);
#end

}


public function transform (matrix:Matrix3):Void {

#if (lime_cffi && lime_cairo && !macro)
Expand Down
8 changes: 8 additions & 0 deletions project/src/graphics/cairo/CairoBindings.cpp
Expand Up @@ -994,6 +994,13 @@ namespace lime {
}


void lime_cairo_text_path (value handle, HxString text) {

cairo_text_path ((cairo_t*)val_data (handle), (char*)text.__s);

}


void lime_cairo_transform (value handle, value matrix) {

Matrix3 mat3 = Matrix3 (matrix);
Expand Down Expand Up @@ -1140,6 +1147,7 @@ namespace lime {
DEFINE_PRIME5v (lime_cairo_stroke_extents);
DEFINE_PRIME1v (lime_cairo_stroke_preserve);
DEFINE_PRIME1v (lime_cairo_surface_flush);
DEFINE_PRIME2v (lime_cairo_text_path);
DEFINE_PRIME2v (lime_cairo_transform);
DEFINE_PRIME3v (lime_cairo_translate);
DEFINE_PRIME0 (lime_cairo_version);
Expand Down

0 comments on commit c04f574

Please sign in to comment.