Instead of float dx; float dy; have a graphene_point_t offset; in the object and in all APIs relating to them.