MCPcopy
hub / github.com/XingangPan/DragGAN / draw

Method draw

gui_utils/gl_utils.py:193–200  ·  view source on GitHub ↗
(self, *, pos=0, zoom=1, align=0, rint=False, color=1, alpha=1, rounding=0)

Source from the content-addressed store, hash-verified

191 gl.glPopClientAttrib()
192
193 def draw(self, *, pos=0, zoom=1, align=0, rint=False, color=1, alpha=1, rounding=0):
194 zoom = np.broadcast_to(np.asarray(zoom, dtype='float32'), [2])
195 size = zoom * [self.width, self.height]
196 with self.bind():
197 gl.glPushAttrib(gl.GL_ENABLE_BIT)
198 gl.glEnable(gl.GL_TEXTURE_2D)
199 draw_rect(pos=pos, size=size, align=align, rint=rint, color=color, alpha=alpha, rounding=rounding)
200 gl.glPopAttrib()
201
202 def is_compatible(self, *, image=None, width=None, height=None, channels=None, dtype=None): # pylint: disable=too-many-return-statements
203 if image is not None:

Callers 1

draw_frameMethod · 0.80

Calls 2

bindMethod · 0.95
draw_rectFunction · 0.85

Tested by

no test coverage detected