-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Calls of the type ctx.visual.render_???? when given a color with alpha values draw solid objects. This is likely because pygame requires that transparent objects should be drawn on a surface and should be blit on the screen. As such, rendering does blit the entire surface (which may have multiple entities).
Not clear why the surfaces are not blitting correctly. This can be solved easily while working on #38
Minimum code to reproduce the issue.
import gamms
ctx = gamms.create_context(vis_engine=gamms.visual.Engine.PYGAME)
graph.add_node({'id': 0, 'x': 0, 'y': 0})
ctx.visual.set_graph_visual(width=1980, height=1080)
def transparent_circle(ctx, data):
ctx.visual.render_circle(0, 0, 20, (255, 0, 0, 80))
ctx.visual.add_artist('circle', gamms.visual.create_artist(ctx, transparent_circle))
try:
while True:
ctx.visual.simulate()
except KeyboardInterrupt:
ctx.terminate()Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels