artem_dmitriev Posted June 18, 2015 Report Share Posted June 18, 2015 Hello. I'd like to draw a scheme on the screen by using of different functions like gdispDrawPixel,gdispDrawLine,gdispDrawCircle etc. Does ugfx has scale function (coordinate transformation)? I need to scale created image on the screen. Link to comment Share on other sites More sharing options...
inmarket Posted June 18, 2015 Report Share Posted June 18, 2015 The polygon functions support translation and the gwin 3d widget supports full translation, rotation and scaling but other than that no.The reason is just complexity for embedded platforms.Come to think of it there might be suitable matrix operations in the GMISC module but I can't remember if they made the master repository. If they did make it they include those capabilities as either floats or fixed point math. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 18, 2015 Report Share Posted June 18, 2015 Polygon functions do indeed provide parameters for translation. However, scaling is not implemented.The GMSIC module provides some magic like gmiscMatrixFixed2DApplyScale() which you might (should) be able to apply on the array of points which is being passed to the polygon drawing functions.You can find the API reference of the GMISC module here: http://api.ugfx.org/master/group___g_m_i_s_c.htmlNote: The GMISC module is not really heavily tested. However, we don't know of any issues so far.~ Tectu Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted June 18, 2015 Report Share Posted June 18, 2015 Chatting with inmarket it just turned out that we actually have an official demo showing how to rotate, scale and transform a polygon. You can find the demo under /demos/modules/gdisp/polygons/.~ Tectu Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now