Skip to content

Commit

Permalink
Fix: Alpha value of the background color does not work (#216)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4f175c7)
  • Loading branch information
nutti committed Sep 28, 2024
1 parent 61faf1a commit 33caa23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/screencast_keys/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def circle_verts_num(r):
math.pi * 0.5,
]

original_state = gpu.state.blend_get()
gpu.state.blend_set('ALPHA')
imm.immColor4f(*color)
imm.immLineWidth(line_thickness)

Expand All @@ -263,6 +265,7 @@ def circle_verts_num(r):

imm.immLineWidth(1.0)
imm.immColor4f(1.0, 1.0, 1.0, 1.0)
gpu.state.blend_set(original_state)


def draw_rect(x1, y1, x2, y2, color):
Expand Down

0 comments on commit 33caa23

Please sign in to comment.