canvas

How to find the coordinates of the buttons on a canvas, and click on them after using Java and Selenium?

不问归期 提交于 2020-05-21 07:12:19
问题 I have an online calculator that i want to automate some operations for, like subtraction, division, etc. but the thing is that there are no elements since it is a canvas app calculator (link below). I'm wondering how can i click the buttons so im able to automate some operations? The online calculator im trying to automate: https://www.online-calculator.com/full-screen-calculator/ The canvas HTML code <canvas id="canvas" width="335" height="434" style="position: absolute; display: block;

Draw arrow head in canvas using Angle

送分小仙女□ 提交于 2020-05-17 03:53:05
问题 I tried with following code, But this code is not working as expected. Actually I hesitated to ask help for this simple solution, But I have wasted lots of time, finally I came here. deltaX = bounds.right - bounds.left; deltaY = bounds.bottom - bounds.top; double distance = Math.sqrt(Math.pow(deltaX, 2) + Math.pow(deltaY, 2)); float arrowLength= (float) (distance / 3); float lineAngle = (float) Math.atan2(deltaY, deltaX); float angle = (float) Math.toRadians(20); float sinValue = (float) Math

How do I set the z index of an Python tkinter canvas element?

丶灬走出姿态 提交于 2020-05-17 03:11:48
问题 how can I set the z-index of tkinter canvas elements (circle, rectangle) on initial startup of the canvas? Or can I set a z-index directly when drawing e.g. a circle? Unfortunately I could not do much with canvas.tag_lower("tag_name") . I thought this command moves all elements of a tag one level back - is that so? class CanvasGui(tk.Canvas): def __init__(self, master): super().__init__(master, bg="#FFF", highlightthickness=0, borderwidth=0) self.pack(fill="both", expand=True) self

How do I set the z index of an Python tkinter canvas element?

大憨熊 提交于 2020-05-17 03:11:27
问题 how can I set the z-index of tkinter canvas elements (circle, rectangle) on initial startup of the canvas? Or can I set a z-index directly when drawing e.g. a circle? Unfortunately I could not do much with canvas.tag_lower("tag_name") . I thought this command moves all elements of a tag one level back - is that so? class CanvasGui(tk.Canvas): def __init__(self, master): super().__init__(master, bg="#FFF", highlightthickness=0, borderwidth=0) self.pack(fill="both", expand=True) self

NodeJS Canvas | Clip region not accurate - Random whitespaces along edges

岁酱吖の 提交于 2020-05-16 02:23:55
问题 I'm facing a problem with the Canvas clip function. I got the coordinates of the border of the first star on the following picture, but when I clip along the coordinates and then erase the rest I am left with some whitespaces around the star. Some edges like the bottom right ones work fine, but the others don't. I checked the coordinates by hand via Gimp and they're perfectly aligned along the border (clip border is running on the white pixels touching the outter black border) Coordinates

NodeJS Canvas | Clip region not accurate - Random whitespaces along edges

旧巷老猫 提交于 2020-05-16 02:22:55
问题 I'm facing a problem with the Canvas clip function. I got the coordinates of the border of the first star on the following picture, but when I clip along the coordinates and then erase the rest I am left with some whitespaces around the star. Some edges like the bottom right ones work fine, but the others don't. I checked the coordinates by hand via Gimp and they're perfectly aligned along the border (clip border is running on the white pixels touching the outter black border) Coordinates

EaselJS - broken panning on zoomed image

故事扮演 提交于 2020-05-15 05:58:22
问题 I'm having trouble fixing panning in this example - it works fine unless you move the zoomed image and then zoom again(offset is set to default value and the view jumps to initial position - http://jsfiddle.net/p2Qzg/). Any ideas on how to fix that? I've been trying to solve that for three days now, without any good results. var canvas= document.getElementById("myCanvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var stage = new createjs.Stage("myCanvas");

EaselJS - broken panning on zoomed image

我的梦境 提交于 2020-05-15 05:58:06
问题 I'm having trouble fixing panning in this example - it works fine unless you move the zoomed image and then zoom again(offset is set to default value and the view jumps to initial position - http://jsfiddle.net/p2Qzg/). Any ideas on how to fix that? I've been trying to solve that for three days now, without any good results. var canvas= document.getElementById("myCanvas"); canvas.width = window.innerWidth; canvas.height = window.innerHeight; var stage = new createjs.Stage("myCanvas");

What is the surface.blit() function in pygame? What does it do? How does it work?

被刻印的时光 ゝ 提交于 2020-05-14 18:23:04
问题 I am a beginner in Python and I am not clear about the function surface.blit() . What does it do? How does it works? I have come across the following points as to how to create it. Create a canvas of desired size Create a surface of smaller size containing the object to be displayed. Define the Rect value of the surface. Blit (overlap) the surface on the canvas at the rect position Syntax: canvas.blit(surface, surfacerect) Why is only rect used? Can it be any other shape? 回答1: Putting this in

How to draw transparent text on form?

不羁岁月 提交于 2020-05-13 18:08:24
问题 Is there a way to draw a transparent text on form that has some controls? If I use TLabel control, it would always show behind controls on the form. 回答1: You cannot use a TLabel control, since it is not a windowed control, and therefore it will be hidden by every windowed child control of the form. You could use a TStaticText , which is indeed a windowed control (a STATIC control), but it will be a bit difficult to make it truly transparent, I'd suppose. You can use layered windows for this: