2021-09-02 12:16 AM
Hi,
I use some shapes in my screen view which makes the screen view class code size up to 15KB, how to cut down the code size? Can I new the object when the view is created? Will it work ?
Thanks!
2021-09-09 04:16 AM
Hi,
What do you mean by "can I new the object" ? Do you mean initialize a shape widget in the constructor or in the setUpScreen() function in the <NameOfScreen>View.cpp ?
/Romain
2021-09-10 03:43 AM
Yes! For the reaseon that I use a lot of shapes object in a View class and it cost nearly 40KB code size. Can I do like this ?:
Shape<4> *shape1 = new Shape<4>();
I need only set the four points and postion which are regular so that it will cost a less code size.But is it doable?
Thanks!
2021-09-10 07:12 AM
I think it works, you may do many extra work to maitain correct data of 4 Shapes, TouchGFX Demo 3 (TouchGFX Designer 4.17.0) show SparseContainerList class which use few Container to manage many items,may give you some inspiration.