emacs-devel
[Top][All Lists]
Advanced

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

Re: Testing native image scaling


From: Eli Zaretskii
Subject: Re: Testing native image scaling
Date: Sun, 20 Jan 2019 21:41:02 +0200

> Date: Sun, 20 Jan 2019 19:26:31 +0000
> From: Alan Third <address@hidden>
> Cc: address@hidden
> 
> > Where's the NS support for that?  AFAICT, :rotate is only handled in
> > ImageMagick specific portions of the code, what did I miss?
> 
> It’s buried in nsimage.m, ns_load_image gets both :rotation and
> :index, then processes the image as appropriate.

Thanks, I will take a look.

> 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.

> 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?



reply via email to

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