Hi all, I want to know  if there are some ways to rotate an image object
to a custom angle with C language API of EFL, here is some Python code I
googled,  but I could not find the corresponding function in
Ecore_Evas/Evas C language API documents. I really appreciate if anyone
can tell me how to or send me some example code. The Python code is as
following:

#!/usr/bin/env python

import sys
import ecore
import evas
import ecore.evas

if 'x11' in sys.argv:
    ee = ecore.evas.SoftwareX11(w=800, h=480)
else:
    ee = ecore.evas.SoftwareX11_16(w=800, h=480)

bg = ee.evas.Rectangle(color=(255, 255, 255, 255))
bg.size = ee.evas.size
bg.show()

img = ee.evas.Image()
img.file_set("icon.png")
img.move(380, 200)
w, h = img.image_size_get()
img.resize(w, h)
img.fill_set(0, 0, w, h)
img.show()

rotation = [evas.EVAS_IMAGE_ROTATE_90]
def rotate_img(rotation):
    img.rotate(rotation[0])
    rotation[0] += 1
    return rotation[0] <= evas.EVAS_IMAGE_ROTATE_270

ee.fullscreen = False
ee.show()

ecore.timer_add(2.0, rotate_img, rotation)
ecore.main_loop_begin()

# prevent segfault
del ee

Thank you very much!

-- 
Be Yourself @ mail.com!
Choose From 200+ Email Addresses
Get a Free Account at www.mail.com

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to