[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Image transformations
From: |
Eli Zaretskii |
Subject: |
Re: Image transformations |
Date: |
Wed, 26 Jun 2019 18:34:00 +0300 |
> Date: Wed, 26 Jun 2019 09:28:17 +0900
> From: YAMAMOTO Mitsuharu <address@hidden>
> Cc: Stefan Monnier <address@hidden>,
> address@hidden
>
> First, I couldn't find any Windows GDI API that deals with affine
> transformation matrices directly.
The GDI API which uses the matrices directly is SetWorldTransform, see
https://docs.microsoft.com/en-us/windows/desktop/api/wingdi/nf-wingdi-setworldtransform
I eventually decided not to use it, because when I tried, it displayed
a slightly stretched image even with a trivial matrix, i.e. no
transform at all. Also, the more general description of the topic,
which you can find here:
https://docs.microsoft.com/en-us/windows/desktop/gdi/about-coordinate-spaces-and-transformations
and the examples here:
https://docs.microsoft.com/en-us/windows/desktop/gdi/using-coordinate-spaces-and-transformations
did not tell enough detail nor show enough examples for me to be sure
I really understand the subject. So I'm using PlgBlt instead. But I
still want to keep compatibility with the transform matrices as
defined in the documentation of SetWorldTransform, and I'm using the
equations shown there to produce the coordinates that PlgBlt needs.
This will allow to use SetWorldTransform in the future if we want to
(assuming someone will understand why it didn't work for me to be gin
with).
> Guessing from its API design, I think GDI does not internally perform
> any (real-valued) matrix calculations, but uses some variant of
> Bresenham's line algorithm for image transformations to prefer integer
> arithmetics.
I think the fact that SetWorldTransform exists contradicts this
conclusion. The matrix is defined as an array of floats.
- Re: Image transformations, (continued)
- Re: Image transformations, Alan Third, 2019/06/17
- Re: Image transformations, Eli Zaretskii, 2019/06/19
- Re: Image transformations, Eli Zaretskii, 2019/06/24
- Re: Image transformations, Stefan Monnier, 2019/06/24
- Re: Image transformations, Eli Zaretskii, 2019/06/24
- Re: Image transformations, Stefan Monnier, 2019/06/24
- Re: Image transformations, Eli Zaretskii, 2019/06/25
- Re: Image transformations, Stefan Monnier, 2019/06/25
- Re: Image transformations, Eli Zaretskii, 2019/06/25
- Re: Image transformations, YAMAMOTO Mitsuharu, 2019/06/25
- Re: Image transformations,
Eli Zaretskii <=
- Re: Image transformations, YAMAMOTO Mitsuharu, 2019/06/26
- Re: Image transformations, Eli Zaretskii, 2019/06/27
- Re: Image transformations, Alan Third, 2019/06/25
- Re: Image transformations, Eli Zaretskii, 2019/06/25
- Re: Image transformations, Eli Zaretskii, 2019/06/27
- Re: Image transformations, Alan Third, 2019/06/28
- Re: Image transformations, Eli Zaretskii, 2019/06/28
- Re: Image transformations, Eli Zaretskii, 2019/06/29
- Re: Image transformations, Alan Third, 2019/06/29
- Re: Image transformations, Alan Third, 2019/06/29