On Thu, 5 Apr 2007 00:16:02 -0500 Brian Mattern <[EMAIL PROTECTED]> babbled:
> On Thu, Apr 05, 2007 at 04:09:59AM +0000, [EMAIL PROTECTED] wrote: > > > > > > all in all this isnt a simple solution. the only way i see to > > > > handle both methods is to have 2 calls. 1 to add a point relative > > > > to origin and one to specify it absolutely. > > > > > > Two calls makes sense, but I think internally the point list > > > should be relative to the object origin, and then convert to > > > absolute coords at render time. This would allow us to do some > > > sore of scaling based on object size (although some error would > > > be introduced if the points were specified in abs coords). > > > > In order to eliminate cummulative errors, the vertex coords > > must be stored as input (possibly modulo integer translations). > > In order to minimize confusion from multiple coord systems > > (and every time you have any kind of transformation, you basically > > create a new coord system), or things like eg. mixing calls to add > > points with calls to move/resize/rotate the obj (something which > > I think ought to be avoided in usage), the inputs must have an > > 'absolute' interpretation - either absolute rel to the canvas, > > or absolute rel to an (untransformed) 'obj coord system'. > > > > I'd have to say that I think it would be best if the inputs > > were taken rel to the (untransformed) obj, and nothing else. The > > object size would grow with points added, or with resizing (scaling > > the poly), and the bounding rect would change with rotations, etc.. > > But the input vertex coords would have an absolute interpretation > > as being rel to the (untransformed) obj. > > All of this is exactly what I had in mind, with an additional call that > took points in absolute canvas coords and then converted them to object > coords (at the current location/rotation/scaling). The use case I had in > mind for such a function would be to add points based on mouse input. It > would basically just do > > px,py = canvas_coords_to_polygon_coords(cx, cy) > polygon_point_add(px,py) > > So, maybe we would just need the functions that map between the two > coordinate spaces :) that's kind of what i was saying. if you make the current point_add relative to obj top-left, then you will need an absolute call to set abs points (but then get turned into obj-relative at add time). on move and resize points are transformed FROM what they were originally set at - scaling tho needs to always keep the original setting and scale given the current scaling factor. > Brian > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [EMAIL PROTECTED] 裸好多 Tokyo, Japan (東京 日本) ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
