Answers for "program to draw rectangle in python"

1

how to draw shape square in python turtle

#Python program to draw color filled square in turtle programming
import turtle
 
t = turtle.Turtle()
t.fillcolor('blue')
t.begin_fill()
for i in range(4):
  t.forward(150)
  t.right(90)
t.end_fill()
Posted by: Guest on June-19-2020
0

python opencv draw rectangle

image = cv2.imread(path) 

start_point = (5, 5) 
end_point = (220, 220) 
  
# Blue color in BGR 
color = (255, 0, 0) 
  
# Line thickness of 2 px 
thickness = 2
  
# Using cv2.rectangle() method 
# Draw a rectangle with blue line borders of thickness of 2 px 
image = cv2.rectangle(image, start_point, end_point, color, thickness)
Posted by: Guest on July-22-2020
0

python draw rectangle on image

img = matplotlib. image. imread("./kite_logo.png")
figure, ax = pyplot. subplots(1)
rect = patches. Rectangle((125,100),50,25, edgecolor='r', facecolor="none")
ax. imshow(img) Displays an image.
ax. add_patch(rect) Add rectangle to image.
Posted by: Guest on September-25-2020

Python Answers by Framework

Browse Popular Code Answers by Language