python - Kivy understand self.pos and self.size -


whenever try span canvas across layout, have this

<floatlayout>:     canvas:         color:             rgba: 54 / 255, 60 / 255, 72 / 255, 1         rectangle:             pos: self.pos             size: self.size 

i have been playing around , fail understand self.pos referring to? reading documentation seems points current widget should rectangle. when enter debug mode, notice default value of self.size (100, 100).

rectangle not widget, it's canvas instruction, widget representation (a set of canvas instructions) + behavior (various methods 'on_touch_down'). in kv, self designate current widget, here, floatlayout.

widget's default size indeed '(100, 100)' it's default any.


Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -