From 989bc859338e4f91cdebee35ff6b0afe21bb35e9 Mon Sep 17 00:00:00 2001 From: alufers <alufers@wp.pl> Date: Fri, 18 Aug 2023 12:39:47 +0200 Subject: [PATCH] uctx: Make example of add_stop use floating point numbers --- python_payload/mypystubs/ctx.pyi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python_payload/mypystubs/ctx.pyi b/python_payload/mypystubs/ctx.pyi index ca41ab9a7d..74387ffe6f 100644 --- a/python_payload/mypystubs/ctx.pyi +++ b/python_payload/mypystubs/ctx.pyi @@ -292,12 +292,12 @@ class Context(Protocol): This is a simple example rendering a rainbow gradient on the right side of the screen: >>> ctx.linear_gradient(0.18*120,0.5*120,0.95*120,0.5*120) - >>> ctx.add_stop(0.0, [255,0,0], 1.0) - >>> ctx.add_stop(0.2, [255,255,0], 1.0) - >>> ctx.add_stop(0.4, [0,255,0], 1.0) - >>> ctx.add_stop(0.6, [0,255,255], 1.0) - >>> ctx.add_stop(0.8, [0,0,255], 1.0) - >>> ctx.add_stop(1.0, [255,0,255], 1.0) + >>> ctx.add_stop(0.0, [1.0,0.0,0.0], 1.0) + >>> ctx.add_stop(0.2, [1.0,1.0,0.0], 1.0) + >>> ctx.add_stop(0.4, [0.0,1.0,0.0], 1.0) + >>> ctx.add_stop(0.6, [0.0,1.0,1.0], 1.0) + >>> ctx.add_stop(0.8, [0.0,0.0,1.0], 1.0) + >>> ctx.add_stop(1.0, [1.0,0.0,1.0], 1.0) >>> ctx.rectangle(-120, -120, 240, 240) >>> ctx.fill() """ -- GitLab