-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3453fb0
commit 14e39aa
Showing
2 changed files
with
71 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
require "./cairo" | ||
|
||
{% if CairoCr::HAS_SVG_SURFACE %} | ||
module CairoCr | ||
@[Link("cairo")] | ||
lib Cairo | ||
enum SvgVersionT | ||
V_1_1, | ||
V_1_2 | ||
end | ||
|
||
fun svg_surface_create = cairo_svg_surface_create( | ||
filename : UInt8*, | ||
width_in_points : Float64, | ||
height_in_points : Float64 | ||
) : PSurfaceT | ||
|
||
fun svg_surface_create_for_stream = cairo_svg_surface_create_for_stream( | ||
write_func : WriteFuncT, | ||
closure : Void*, | ||
width_in_points : Float64, | ||
height_in_points : Float64 | ||
) : PSurfaceT | ||
|
||
fun svg_surface_restrict_to_version = cairo_svg_surface_restrict_to_version( | ||
surface : PSurfaceT, | ||
version : SvgVersionT | ||
) : Void | ||
|
||
fun svg_get_versions = cairo_svg_get_versions( | ||
versions : SvgVersionT**, | ||
num_versions : Int32* | ||
) : Void | ||
|
||
fun svg_version_to_string = cairo_svg_version_to_string( | ||
version : SvgVersionT | ||
) : UInt8* | ||
end # lib Cairo | ||
end # module CairoCr | ||
{% else %} # CairoCr::HAS_SVG_SURFACE | ||
puts "Cairo was not compiled with support for the svg backend" | ||
{% end %} # CairoCr::HAS_SVG_SURFACE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
require "./cairo" | ||
|
||
{% if CairoCr::HAS_TEE_SURFACE %} | ||
module CairoCr | ||
@[Link("cairo")] | ||
lib Cairo | ||
fun tee_surface_create = cairo_tee_surface_create( | ||
master : PSurfaceT | ||
) : PSurfaceT | ||
|
||
fun tee_surface_add = cairo_tee_surface_add( | ||
surface : PSurfaceT, | ||
target : PSurfaceT | ||
) : Void | ||
|
||
fun tee_surface_remove = cairo_tee_surface_remove( | ||
surface : PSurfaceT, | ||
target : PSurfaceT | ||
) : Void | ||
|
||
fun tee_surface_index = cairo_tee_surface_index( | ||
surface : PSurfaceT, | ||
index : UInt32 | ||
) : PSurfaceT | ||
end # lib Cairo | ||
end # module CairoCr | ||
{% else %} # CairoCr::HAS_TEE_SURFACE | ||
puts "Cairo was not compiled with support for the TEE backend" | ||
{% end %} # CairoCr::HAS_TEE_SURFACE |