[Top][All Lists]

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

Re: Testing native image scaling

From: Alan Third
Subject: Re: Testing native image scaling
Date: Sun, 20 Jan 2019 20:19:25 +0000
User-agent: Mutt/1.10.1 (2018-07-13)

On Sun, Jan 20, 2019 at 09:41:02PM +0200, Eli Zaretskii wrote:
> > If we were to add XRender rotation support, I’d be tempted to do both
> > rotation and scaling using affine transformation matrices in both
> > XRender and NS, as they would then both use the same code to calculate
> > the transforms. I believe Windows supports transformation matrices
> > through D2D, but I assume Emacs doesn’t use D2D currently, so it may
> > not be straight forward to add.
> Windows can calculate and use transformation matrices without D2D as
> well, it's really quite simple.  You calculate the matrix elements,
> and then call a function to install it for the next BitBlt.

Sounds very similar to how XRender works. It might be worth giving
this a go, then.

> > If we were to go that far, it may be worth actually exposing the
> > matrices to lisp and handle the calculations there
> What advantages would that give us?  Wouldn't it be better to support
> higher-level abstractions for the transformations, like scaling,
> rotation, and shear?

It would simplify the C code, and move those higher level abstractions
into lisp. I’m not sure if that’s a good thing, but hasn’t it been the
stated intention of the Emacs project for a while?

It would make it harder to understand for a human what any given image
spec would be expected to do, but then I don’t know if humans look at
image specs much.
Alan Third

reply via email to

[Prev in Thread] Current Thread [Next in Thread]