[android-developers] Re: Accessing to Canvas's parent
What are you trying to say? On 22 dic, 05:49, Sudhi Hn wrote: > Hey guys good work > > On Dec 21, 11:28 pm, Gilberto Cuba R wrote: > > > > > > > > > Hello colleagues, > > > I'm trying to simulate the HTML5 Canvas behaviour on Android. In > > order to achieve this, I have created several classes that inheritate > > from View, and therefore have "THEIR OWN" canvas, wich is not shared, > > (and please correct me if I'm wrong) that is, that all my inherited > > View classes have a Canvas that is not relationed with other instance > > classes. So, I've named this classes after the figures, for instance: > > MyLine, MyCircle, MyRectangle, MyPolygon, etc. When it comes to > > drawing > > this figures I have no problem at all because all I do is overwrite > > the onDraw() method and no harm done. Only that the canvas I'm > > currently drawing is the same as in the figure. > > > All this mess has its inconveniences, or at least is coming out as > > so, > > for I also mean to implement a MyClip() class, allowing it to > > properly > > apply to the canvas's drawClip method when it is leveled with the > > other > > figures, any other way, it doesn't work out as expected. And well, > > such > > like this one I have other troubles for not being able to acces the > > Canvas of the Parent on my class. > > > Any suggestions on the path I should follow, or at least some > > reajustment in the classes desing so I can reach my goal? > > > Thank you for advance. > > > Gilberto Cuba -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Accessing to Canvas's parent
Thanks for answering Romain Guy. And, how I can access this Canvas shared by all Views in the same window? Why you say I can understand, that the Canvas of bottom View contains the drawing of other Views, is this true? 2011/12/21, Romain Guy : > a > All views in a same window share a single Canvas. There's no such thing as > a parent Canvas. > On Dec 21, 2011 9:37 PM, "Gilberto Cuba R" wrote: > >> Hello colleagues, >> >> I'm trying to simulate the HTML5 Canvas behaviour on Android. In >> order to achieve this, I have created several classes that inheritate >> from View, and therefore have "THEIR OWN" canvas, wich is not shared, >> (and please correct me if I'm wrong) that is, that all my inherited >> View classes have a Canvas that is not relationed with other instance >> classes. So, I've named this classes after the figures, for instance: >> MyLine, MyCircle, MyRectangle, MyPolygon, etc. When it comes to >> drawing >> this figures I have no problem at all because all I do is overwrite >> the onDraw() method and no harm done. Only that the canvas I'm >> currently drawing is the same as in the figure. >> >> All this mess has its inconveniences, or at least is coming out as >> so, >> for I also mean to implement a MyClip() class, allowing it to >> properly >> apply to the canvas's drawClip method when it is leveled with the >> other >> figures, any other way, it doesn't work out as expected. And well, >> such >> like this one I have other troubles for not being able to acces the >> Canvas of the Parent on my class. >> >> Any suggestions on the path I should follow, or at least some >> reajustment in the classes desing so I can reach my goal? >> >> Thank you for advance. >> >> Gilberto Cuba >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to android-developers@googlegroups.com >> To unsubscribe from this group, send email to >> android-developers+unsubscr...@googlegroups.com >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- --- Saludos, Gilberto Cuba -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Accessing to Canvas's parent
Please, helpme or post some tips!! 2011/12/21, Gilberto Cuba R : > Hello colleagues, > > I'm trying to simulate the HTML5 Canvas behaviour on Android. In > order to achieve this, I have created several classes that inheritate > from View, and therefore have "THEIR OWN" canvas, wich is not shared, > (and please correct me if I'm wrong) that is, that all my inherited > View classes have a Canvas that is not relationed with other instance > classes. So, I've named this classes after the figures, for instance: > MyLine, MyCircle, MyRectangle, MyPolygon, etc. When it comes to > drawing > this figures I have no problem at all because all I do is overwrite > the onDraw() method and no harm done. Only that the canvas I'm > currently drawing is the same as in the figure. > > All this mess has its inconveniences, or at least is coming out as > so, > for I also mean to implement a MyClip() class, allowing it to > properly > apply to the canvas's drawClip method when it is leveled with the > other > figures, any other way, it doesn't work out as expected. And well, > such > like this one I have other troubles for not being able to acces the > Canvas of the Parent on my class. > > Any suggestions on the path I should follow, or at least some > reajustment in the classes desing so I can reach my goal? > > Thank you for advance. > > Gilberto Cuba > -- --- Saludos, Gilberto Cuba -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en