[cairo] [patch] enable projective transformations
a.g.nienhuis at gmail.com
Tue Aug 17 04:24:05 PDT 2010
On Tue, Aug 17, 2010 at 12:56 PM, Andrea Canciani <ranma42 at gmail.com> wrote:
> On Tue, Aug 17, 2010 at 12:52 PM, Arjen Nienhuis <a.g.nienhuis at gmail.com> wrote:
>>> To use it for 3D transformations you would need 4x3 (and 4x4 if you
>>> want projections, too).
>>> The question was: what would 3D transformations be used for?
>>> (Remember: cairo uses 2D surfaces, thus the third dimension input
>>> would be constant and its output would get discarded "soon")
>> Use case: 2 windows with buttons that 'stick out'.
>> def draw_window(ctx, w):
>> draw_background(ctx, w.background)
>> draw_buttons(ctx, w.buttons)
>> def main():
>> draw_window(ctx, w1)
>> ctx.translate(300, 0)
>> draw_window(ctx, w2)
>> I think this needs a 4x3 matrix. You need the value of the rotation
>> around the y axis to make translate_z have the right effect.
> Are you saying that if you want to use 4x3 transforms (rotate_y), you
> need 4x3 transforms?
I have this use case. I think it needs rotate_y and translate_z. I
think it needs 4x3 transforms.
Do you have better way to deal with this use case? Do you have
different use cases? Is my use case useful/clear/typical?
Met vriendelijke groet,
More information about the cairo