Draw figure on top of an other figure in Kivy language [duplicate]How to overlay 2 layouts in Kivy (Python)?Kivy: memory leaks on my 'Game of life' codeusing Kivy Garden Graph in KV languageRendering text to a kivy canvasWhy isn't this rectangle centered in Kivy?Dealing with ScrollViews in KivyKivy behavior of drawing in canvas, to change it's backgroundAutoresizing Canvas in a Kivy App'Change Color' button Python KivyHow do I draw a simple line and a rectangle using Kivy in Python3?
Why is this int array not passed as an object vararg array?
Should these notes be played as a chord or one after another?
What does "Ich wusste, dass aus dir mal was wird" mean?
On studying Computer Science vs. Software Engineering to become a proficient coder
How do I tell my supervisor that he is choosing poor replacements for me while I am on maternity leave?
What does i386 mean on macOS Mojave?
What are the implications of the new alleged key recovery attack preprint on SIMON?
Was there ever any real use for a 6800-based Apple I?
How many are the non-negative integer solutions of 𝑥 + 𝑦 + 𝑤 + 𝑧 = 16 where x < y?
What to do if SUS scores contradict qualitative feedback?
How could a Lich maintain the appearance of being alive without magic?
Make all the squares explode
Early arrival in Australia, early hotel check in not available
A cryptic tricolour
Does Nightwing have a utility belt?
Why is “Ich wusste, dass aus dir mal was wird” grammitally correct?
Smallest Guaranteed hash collision cycle length
How to cope with regret and shame about not fully utilizing opportunities during PhD?
Why does my circuit work on a breadboard, but not on a perfboard? I am new to soldering
What's the difference between a Bunsen burner and a gas stove?
What is the best way for a skeleton to impersonate human without using magic?
Extrude the faces of a cube symmetrically along XYZ
Exception propagation: When should I catch exceptions?
Why was Endgame Thanos so different than Infinity War Thanos?
Draw figure on top of an other figure in Kivy language [duplicate]
How to overlay 2 layouts in Kivy (Python)?Kivy: memory leaks on my 'Game of life' codeusing Kivy Garden Graph in KV languageRendering text to a kivy canvasWhy isn't this rectangle centered in Kivy?Dealing with ScrollViews in KivyKivy behavior of drawing in canvas, to change it's backgroundAutoresizing Canvas in a Kivy App'Change Color' button Python KivyHow do I draw a simple line and a rectangle using Kivy in Python3?
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;
This question already has an answer here:
How to overlay 2 layouts in Kivy (Python)?
2 answers
I'm was trying to draw a green rectangle inside of the red rectangle in .kv file. But I see only a red rectangle, maybe green rectangle is hidden behind.
how could I solve this problem?
Thanks
:
canvas:
Color:
rgb: 1, 0, 0
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0
Rectangle:
size: 100, 100
pos: self.center_x, self.center_y
kivy
marked as duplicate by ikolim, Community♦ Mar 23 at 20:31
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to overlay 2 layouts in Kivy (Python)?
2 answers
I'm was trying to draw a green rectangle inside of the red rectangle in .kv file. But I see only a red rectangle, maybe green rectangle is hidden behind.
how could I solve this problem?
Thanks
:
canvas:
Color:
rgb: 1, 0, 0
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0
Rectangle:
size: 100, 100
pos: self.center_x, self.center_y
kivy
marked as duplicate by ikolim, Community♦ Mar 23 at 20:31
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
This question already has an answer here:
How to overlay 2 layouts in Kivy (Python)?
2 answers
I'm was trying to draw a green rectangle inside of the red rectangle in .kv file. But I see only a red rectangle, maybe green rectangle is hidden behind.
how could I solve this problem?
Thanks
:
canvas:
Color:
rgb: 1, 0, 0
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0
Rectangle:
size: 100, 100
pos: self.center_x, self.center_y
kivy
This question already has an answer here:
How to overlay 2 layouts in Kivy (Python)?
2 answers
I'm was trying to draw a green rectangle inside of the red rectangle in .kv file. But I see only a red rectangle, maybe green rectangle is hidden behind.
how could I solve this problem?
Thanks
:
canvas:
Color:
rgb: 1, 0, 0
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0
Rectangle:
size: 100, 100
pos: self.center_x, self.center_y
This question already has an answer here:
How to overlay 2 layouts in Kivy (Python)?
2 answers
kivy
kivy
asked Mar 23 at 12:02
OreoOreo
1
1
marked as duplicate by ikolim, Community♦ Mar 23 at 20:31
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
marked as duplicate by ikolim, Community♦ Mar 23 at 20:31
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
- Align the graphics instructions e.g. Color, Rectangle, etc.
- Change the
pos
position for the second rectangle
Example
main.py
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
runTouchApp(Builder.load_string('''
#:kivy 1.10.1
Screen:
BoxLayout:
canvas.before:
Color:
rgba: 1, 0, 0, 1 # red colour
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0, 1 # green colour
Rectangle:
size: 100, 100
pos: 100, 100
'''))
Output
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
- Align the graphics instructions e.g. Color, Rectangle, etc.
- Change the
pos
position for the second rectangle
Example
main.py
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
runTouchApp(Builder.load_string('''
#:kivy 1.10.1
Screen:
BoxLayout:
canvas.before:
Color:
rgba: 1, 0, 0, 1 # red colour
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0, 1 # green colour
Rectangle:
size: 100, 100
pos: 100, 100
'''))
Output
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
add a comment |
- Align the graphics instructions e.g. Color, Rectangle, etc.
- Change the
pos
position for the second rectangle
Example
main.py
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
runTouchApp(Builder.load_string('''
#:kivy 1.10.1
Screen:
BoxLayout:
canvas.before:
Color:
rgba: 1, 0, 0, 1 # red colour
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0, 1 # green colour
Rectangle:
size: 100, 100
pos: 100, 100
'''))
Output
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
add a comment |
- Align the graphics instructions e.g. Color, Rectangle, etc.
- Change the
pos
position for the second rectangle
Example
main.py
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
runTouchApp(Builder.load_string('''
#:kivy 1.10.1
Screen:
BoxLayout:
canvas.before:
Color:
rgba: 1, 0, 0, 1 # red colour
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0, 1 # green colour
Rectangle:
size: 100, 100
pos: 100, 100
'''))
Output
- Align the graphics instructions e.g. Color, Rectangle, etc.
- Change the
pos
position for the second rectangle
Example
main.py
from kivy.lang import Builder
from kivy.base import runTouchApp
from kivy.core.window import Window
Window.clearcolor = (1, 1, 1, 1)
runTouchApp(Builder.load_string('''
#:kivy 1.10.1
Screen:
BoxLayout:
canvas.before:
Color:
rgba: 1, 0, 0, 1 # red colour
Rectangle:
pos: 0, 0
size: 300, 300
Color:
rgb: 0, 1, 0, 1 # green colour
Rectangle:
size: 100, 100
pos: 100, 100
'''))
Output
answered Mar 23 at 15:38
ikolimikolim
8,7001924
8,7001924
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
add a comment |
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
Thank you. Now I understand that I can't draw inside of figure using alignment. I can do this with the command that you showed me: "canvas.before:". Thanks
– Oreo
Mar 23 at 20:28
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
If my answer have helped you. Please remember to accept and/or up-vote the answer. Thank you.
– ikolim
Mar 23 at 21:11
add a comment |