[cairo] SVG output without "pt" in the coordinates - how?

Asko Kauppi askok at dnainternet.net
Fri Oct 24 04:56:41 PDT 2008

Cairo API gives SVG dimension in points (1 point == 1/72.0 inch).   
However, I'd need to create a file with pixel precise dimensions, that  
is without the "pt" in the output stream:

	<?xml version="1.0" encoding="UTF-8"?>
	<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink 
" width="1000pt" height="903pt" viewBox="0 0 1000 903" version="1.1">
	 <defs> <g>...

Can this be done in any other way than cutting the "pt" simply off in  
the output filter function?   That seems rather harsh.
Is there a reason behind only supporting one mode (SVG allows "em, ex,  
px, pt, pc, cm, mm, in, and percentages"), or is it simply how it is  
for now?

- Asko

More information about the cairo mailing list