Skip to content

Instantly share code, notes, and snippets.

View nongio's full-sized avatar

Riccardo Canalicchio nongio

View GitHub Profile
pdftk infile.pdf burst output $tmpdir/page_%03d.pdf
page=0
imagetype="png"
for file in $tmpdir/*.pdf
do
image=$file.$imagetype
convert -density $density -depth $depth $file $image
rm $file
page=`expr $page + 1`
@nongio
nongio / main.c
Last active October 1, 2021 18:46
A very ugly Wayland EGL Cairo-gl example
// https://gist.github.com/Miouyouyou/ca15af1c7f2696f66b0e013058f110b4
// https://gist.github.com/nikp123/bebe2d2dc9a8287efa9ba0a5b38ffab4
#include <wayland-client-core.h>
#include <wayland-client.h>
#include <wayland-server.h>
#include <wayland-client-protocol.h>
#include <wayland-egl.h> // Wayland EGL MUST be included before EGL headers
#include "xdg-shell-client-protocol.h"
@nongio
nongio / meson_options.txt
Created November 11, 2021 07:33
meson option for cairo with EGL support and surface backend: OpenGL ES 2.0
# Cairo font backends
option('fontconfig', type : 'feature', value : 'auto')
option('freetype', type : 'feature', value : 'auto')
# Cairo surface backends
option('cogl', type : 'feature', value : 'disabled')
option('directfb', type : 'feature', value : 'disabled')
option('gl-backend', type : 'combo', value : 'glesv2',
# FIXME: https://github.com/mesonbuild/meson/issues/4566
choices : ['auto', 'gl', 'glesv2', 'glesv3', 'disabled'])