Skip to content

Instantly share code, notes, and snippets.

@lobingera
lobingera / CairoText.jl
Created April 1, 2020 17:35
CairoText example
module CairoText
using Cairo
using FreeType
mutable struct font_face_t
ptr::Ptr{Nothing}
function font_face_t(ptr::Ptr{Nothing})
/lobingeraI'm trying to follow both of the above proposals and maybe i'm a little bit slow, but do i understand correctly that in Stefan's example.
C is a module defining types and functions (Tc and fc_1)
B is a module defining types and functions (Tb and fb_1)
A = glue(B,C)
A can define fa_1(::Ta), fa_2(::Tb)
using Gtk
using Cairo
global drawInt = 0
function draw_c(widget)
ctx = Gtk.getgc(widget)
global drawInt
drawInt += 1
@lobingera
lobingera / travis.log
Created September 2, 2018 12:38
xterm log travis
Traviss-Mac-6:lib travis$ julia
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.6.4 (2018-07-09 19:09 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | x86_64-apple-darwin14.5.0
l2@o4:~/cairo_int/cairo-1.14.6/src/.libs$ ldd libcairo.so.2.11400.6
linux-vdso.so.1 => (0x00007ffe1731e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fd15619d000)
libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007fd155ef5000)
libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007fd155cb2000)
libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007fd155a08000)
libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007fd1557e3000)
libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007fd1555df000)
libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007fd1553d5000)
libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007fd1551b3000)
@lobingera
lobingera / gist:525219a6d924d3cae395254f853d04df
Created July 3, 2018 15:49
configure on cairo-1.12 local
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
julia> BinDeps.debug("Cairo")
INFO: Reading build script...
WARNING: BinDeps.shlib_ext is deprecated.
likely near C:\Users\appveyor\.julia\v0.5\Cairo\deps\build.jl:112
The package declares 1 dependencies.
- Library Group "cairo"pngTuple{BinDeps.DependencyProvider,Dict{Symbol,Any}}[(B
inDeps.AptGet package libpng12-0,Dict{Symbol,Any}()),(BinDeps.Yum package libpng
,Dict{Symbol,Any}()),(BinDeps.Zypper package libpng12,Dict{Symbol,Any}()),(Autot
ools Build,Dict{Symbol,Any}(Pair{Symbol,Any}(:os,:Unix))),(Simple Build Process,
Dict{Symbol,Any}(Pair{Symbol,Any}(:os,:Windows)))]
C:\projects\julia\bin>julia.exe
_
_ _ _(_)_ | A fresh approach to technical computing
(_) | (_) (_) | Documentation: https://docs.julialang.org
_ _ _| |_ __ _ | Type "?help" for help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 0.5.2 (2017-05-06 16:34 UTC)
_/ |\__'_|_|_|\__'_| | Official http://julialang.org/ release
|__/ | i686-w64-mingw32
travis_fold:start:worker_info
Worker information
hostname: wjb-2.macstadium-us-se-1.travisci.net:755c786a-96f2-4175-a354-c7c943a35dc3
version: v2.6.2 https://github.com/travis-ci/worker/tree/fdccca4efd347ebc889baae641ccbf55bb871d19
instance: 9d8a27c2-fcc6-4b2f-90fe-809094386312:travis-ci-osx10.11-xcode7.3-1480691248
startup: 1m37.483916883s
travis_fold:end:worker_info
travis_fold:start:system_info
Build system information
@lobingera
lobingera / anim1.jl
Created June 1, 2017 18:06
gtk / cairo anim simple
using Gtk, Gtk.ShortNames, Graphics
win = Window("Test")
hbox = Box(:h)
setproperty!(hbox, :homogeneous, true)
push!(win, hbox)
for i = 1:4
canv = Canvas()
push!(hbox, canv)
@schedule begin