[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] e: Using freedesktop.org .desktop files.



> beware. this is relatively inefficient for icons. the resulting
> evas images are generally big (1000x1000 or bigger). i need to:
> 
	Ha! They're hard to miss that way :)

	Rendering them at any given pixel size is fairly easy:
if their default size is w0xh0 say, and you want them at w1xh1,
then allocate your suface at w1xh1 size, and before the call to
the rsvg-render function, add the cairo call
	cairo_scale(cr, w1 / (double)w0, h1 / (double)h0);
or 
	cairo_scale(cr, w1 / dim.em, h1 / dim.ex);

	Actually, just for testing purposes, as things stand,
see if adding the call
	cairo_scale(cr, dim.width / dim.em, dim.height / dim.ex);
does anything differently than what it does now (it shouldn't,
but...).

> 1. add api to evas itself to provide  size "hints" to loaders
> (load at size XxY at maximum and retain aspect) as well as dpi
> hints (you will want both eventually).
> 2. add api to loaders to be able to do this.
> 3. actually use this api in the svg loader
> 4. for shits & giggles try it in the jpeg loader too  :)