Hello,
I am using the following code with pyclutter 0.8.2 (Mac OS X):
import clutter
def show(stage):
print 'Origins:', tex.get_positionu(), group.get_positionu()
print 'Scale:', tex.get_scale(), group.get_scale()
print 'Texture size:', tex.get_sizeu()
v = tex.apply_relative_transform_to_point(group, clutter.Vertex(0, 0, 0))
print 'Transformed origin:', v.x, v.y
v = tex.apply_relative_transform_to_point(group,
clutter.Vertex(tex.get_widthu(), tex.get_heightu(), 0))
print 'Transformed point:', v.x, v.y
stage = clutter.Stage()
stage.set_size(640, 480)
stage.connect('key-press-event', clutter.main_quit)
stage.connect('show', show)
group = clutter.Group()
stage.add(group)
tex = clutter.Texture('mypic.png')
group.add(tex)
group.set_positionu(10.0, 10.0)
tex.set_positionu(10.0, 10.0)
stage.show_all()
clutter.main()
This is the output I get:
Origins: (10.0, 10.0) (10.0, 10.0)
Scale: (1.0, 1.0) (1.0, 1.0)
Texture size: (121.0, 128.0)
Transformed origin: 6720.0 -4560.0
Transformed point: 18624.0 -464.0
I'd expect different transformed points (i.e. (10, 10) for the origin
and (131, 138) for the other point). Am I doing something wrong, or is
this a clutter bug?
Thomas
--
To unsubscribe send a mail to [email protected]