]>
gitweb.michael.orlitzky.com - libsvgtiny-pixbuf.git/log
summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
Michael Orlitzky [Tue, 8 Aug 2023 00:16:49 +0000 (20:16 -0400)]
gdk_pixbuf_get_from_surface.h: make gdk_pixbuf_get_from_surface() static
We don't want to clash with the real one.
Michael Orlitzky [Tue, 8 Aug 2023 00:14:26 +0000 (20:14 -0400)]
Makefile.am,configure.ac: stop using GTK4
Michael Orlitzky [Tue, 8 Aug 2023 00:13:43 +0000 (20:13 -0400)]
io-svg.c: use new gdk_pixbuf_get_from_surface.h; drop gdk/gdk.h
Michael Orlitzky [Tue, 8 Aug 2023 00:08:59 +0000 (20:08 -0400)]
gdk_pixbuf_get_from_surface.h: new file copy/pasted from GDK
This contains the implementation of the (deprecated) function
gdk_pixbuf_get_from_surface(). The main reason we want it inline is to
avoid the need to link with GTK/GDK itself in our pixbuf loader, on
which GDK and GTK should depend. Specifically we don't want to have to
worry about mismatched major versions of GTK.
Michael Orlitzky [Mon, 7 Aug 2023 23:31:08 +0000 (19:31 -0400)]
io-svg.c: add a mutex around svgtiny_parse()
This works around (what appears to be) a thread-safety issue in
libwapcaplet:
https://bugs.netsurf-browser.org/mantis/view.php?id=2857
Michael Orlitzky [Mon, 7 Aug 2023 22:48:06 +0000 (18:48 -0400)]
io-svg.c: use libxml2 to implement the <xi:include> parser
Michael Orlitzky [Mon, 7 Aug 2023 21:50:07 +0000 (17:50 -0400)]
Makefile.am,configure.ac: prepare for libxml2
I'm going to write my awful strstr-based XML parser with libxml2
soon. Have ./configure look for it and "make" use it.
Michael Orlitzky [Mon, 7 Aug 2023 02:36:47 +0000 (22:36 -0400)]
io-svg.c: first attempt at handling content after an XInclude
It turns out that gtk3 (but not gtk4) will sometimes wrap its
<xi:include> tag with a <g> tag that specifies some opacity; see
gtk/gtkicontheme.c in the gtk+-3.0 sources. Currently we are keeping
everything before the <xi:include> tag and dropping everything after
it, which results in mismatched tags because we keep the <g> and then
chop off the </g>. I've hacked something together that looks like it
works but it needs a post-sleep reread.
Michael Orlitzky [Mon, 7 Aug 2023 02:01:59 +0000 (22:01 -0400)]
io-svg.c: constify some arguments.
Michael Orlitzky [Mon, 7 Aug 2023 00:49:59 +0000 (20:49 -0400)]
io-svg.c: defend against things that shouldn't happen
Michael Orlitzky [Mon, 7 Aug 2023 00:44:29 +0000 (20:44 -0400)]
io-svg.c: do nothing if we're handed an increment of size zero
Michael Orlitzky [Sun, 6 Aug 2023 17:39:36 +0000 (13:39 -0400)]
README: mention the symbolic SVG problem
Michael Orlitzky [Sun, 6 Aug 2023 17:28:43 +0000 (13:28 -0400)]
io-svg.c: make two comments more informative
Michael Orlitzky [Sun, 6 Aug 2023 17:27:07 +0000 (13:27 -0400)]
io-svg.c: try to use stupid gtypes consistently.
Michael Orlitzky [Sun, 6 Aug 2023 17:13:39 +0000 (13:13 -0400)]
io-svg.c: clean up compiler warnings
Michael Orlitzky [Sun, 6 Aug 2023 14:38:32 +0000 (10:38 -0400)]
io-svg.c: initial support for gtk-encode-symbolic-svg
There's some extra librsvg-specific magic we need to be able to handle
to support the gtk-encode-symbolic-svg utility. The result is still
incorrect (I don't think libsvgtiny supports <style> elements in an
SVG), but at least it's no longer outputting blank PNGs.
Michael Orlitzky [Sun, 6 Aug 2023 06:05:38 +0000 (02:05 -0400)]
io-svg.c: simplify memory management for context->svg_data
Match up the malloc/free for this buffer rather than freeing it as
soon as possible in some helper function three levels down.
Michael Orlitzky [Sun, 6 Aug 2023 04:34:06 +0000 (00:34 -0400)]
io-svg.c: drop some commented example code that was never used
Michael Orlitzky [Sat, 5 Aug 2023 21:59:45 +0000 (17:59 -0400)]
io-svg.c: update libsvgtiny error descriptions.
The libsvgtiny README gives you some idea of what they mean.
Michael Orlitzky [Sat, 5 Aug 2023 17:48:59 +0000 (13:48 -0400)]
io-svg.c: whitespace cleanup.
Michael Orlitzky [Sat, 5 Aug 2023 17:40:28 +0000 (13:40 -0400)]
io-svg.c: realloc() on each incremental load.
This will reallocate more often -- once per increment, rather than
during only those increments where we run out of space -- but it
simplifies the logic. And I actually suspect that my computer might be
smart sometimes and can avoid some of these reallocations on its own.
Michael Orlitzky [Sat, 5 Aug 2023 16:10:11 +0000 (12:10 -0400)]
configure.ac: hack around "make distcheck" failure.
Michael Orlitzky [Sat, 5 Aug 2023 15:14:53 +0000 (11:14 -0400)]
.gitignore,m4/.gitignore: add gitignore files.
We do the m4 one separately to ensure that the m4 directory
exists. Otherwise autoreconf -fi complains.
Michael Orlitzky [Sat, 5 Aug 2023 15:07:49 +0000 (11:07 -0400)]
README: add one.
Michael Orlitzky [Sat, 5 Aug 2023 14:10:46 +0000 (10:10 -0400)]
configure.ac,Makefile.am: build and install the new thumbnailer.
Michael Orlitzky [Sat, 5 Aug 2023 14:10:33 +0000 (10:10 -0400)]
libsvgtiny.thumbnailer.in: new thumbnailer template
Michael Orlitzky [Sat, 5 Aug 2023 02:51:12 +0000 (22:51 -0400)]
io-svg.c: back to diagram width and height once again.
Michael Orlitzky [Sat, 5 Aug 2023 02:13:06 +0000 (22:13 -0400)]
io-svg.c: remove code for non-incremental loading.
This requires you to completely install the module before testing with
svg2png, but it makes sure that we test the real (incremental) code
path that gets used.
Michael Orlitzky [Sat, 5 Aug 2023 01:27:31 +0000 (21:27 -0400)]
io-svg.c: miscellaneous documentation and error-handling improvements.
Michael Orlitzky [Fri, 4 Aug 2023 23:34:53 +0000 (19:34 -0400)]
io-svg.c: more work towards incremental loading (not functional yet).
Michael Orlitzky [Fri, 4 Aug 2023 22:33:48 +0000 (18:33 -0400)]
io-svg.c: add "incremental load" scaffolding.
Michael Orlitzky [Fri, 4 Aug 2023 20:52:40 +0000 (16:52 -0400)]
Makefile.am: don't version the shared library.
Michael Orlitzky [Fri, 4 Aug 2023 20:11:02 +0000 (16:11 -0400)]
Makefile.am: don't install the svg2png test program.
Michael Orlitzky [Fri, 4 Aug 2023 20:00:08 +0000 (16:00 -0400)]
configure.ac,Makefile.am: build both a library and an executable.
Michael Orlitzky [Fri, 4 Aug 2023 19:59:35 +0000 (15:59 -0400)]
example.c: rename to io-svg.c (standard upstream pixbuf loader filename).
Michael Orlitzky [Fri, 4 Aug 2023 18:43:15 +0000 (14:43 -0400)]
example.c: improve GError handling.
Michael Orlitzky [Fri, 4 Aug 2023 17:59:57 +0000 (13:59 -0400)]
example.c: refactor to eliminate copy/pasted code.
Michael Orlitzky [Fri, 4 Aug 2023 13:19:51 +0000 (09:19 -0400)]
example.c: use transparent background.
Michael Orlitzky [Fri, 4 Aug 2023 13:12:00 +0000 (09:12 -0400)]
example.c: go back to viewport width/height.
Michael Orlitzky [Fri, 4 Aug 2023 13:05:00 +0000 (09:05 -0400)]
example.c,Makefile.am: begin adding GdkPixbufModule parts.
Michael Orlitzky [Fri, 4 Aug 2023 12:21:01 +0000 (08:21 -0400)]
example.c: render to diagram width/height instead of the viewport's.
Michael Orlitzky [Fri, 4 Aug 2023 11:39:39 +0000 (07:39 -0400)]
LICENSE: add AGPLv3.
Michael Orlitzky [Fri, 4 Aug 2023 02:14:45 +0000 (22:14 -0400)]
example.c: switch back to the stream-based file API.
GdkPixbuf's module->load function takes a FILE* and not a path (or
descriptor), so let's go back to that.
Michael Orlitzky [Fri, 4 Aug 2023 01:58:15 +0000 (21:58 -0400)]
example.c: use GdkPixbuf instead of Cairo for SVG -> PNG conversion.
Michael Orlitzky [Fri, 4 Aug 2023 01:57:54 +0000 (21:57 -0400)]
Makefile.am,configure.ac: pull in gtk4 and gdk-pixbuf-2.0.
Michael Orlitzky [Fri, 4 Aug 2023 01:20:25 +0000 (21:20 -0400)]
example.c: factor out cairo_context_from_diagram().
Michael Orlitzky [Fri, 4 Aug 2023 00:45:41 +0000 (20:45 -0400)]
example.c: factor out svgtiny_diagram_from_path().
Michael Orlitzky [Fri, 4 Aug 2023 00:13:33 +0000 (20:13 -0400)]
Ghostscript_Tiger.svg: drop from repository; no longer hard-coded.
Michael Orlitzky [Fri, 4 Aug 2023 00:13:13 +0000 (20:13 -0400)]
example.c: take INPUT/OUTPUT filenames as arguments.
Michael Orlitzky [Thu, 3 Aug 2023 20:56:06 +0000 (16:56 -0400)]
example.c: get SVG -> PNG conversion via libsvgtiny/cairo working.
Michael Orlitzky [Thu, 3 Aug 2023 20:55:47 +0000 (16:55 -0400)]
Ghostscript_Tiger.svg: add the example file that everyone uses.
Michael Orlitzky [Thu, 3 Aug 2023 20:55:31 +0000 (16:55 -0400)]
Makefile.am: use "CFLAGS" from pkg-config.
Michael Orlitzky [Thu, 3 Aug 2023 19:13:00 +0000 (15:13 -0400)]
Add autotools build system and rename some things.
Michael Orlitzky [Thu, 3 Aug 2023 18:48:58 +0000 (14:48 -0400)]
Initial commit of Hello, world!