Questions tagged [graphicscontext]
64 questions
1
vote
1 answer
Change image in iOS using mask color
How to change image from
to
Thanks for any help and answer!

Matrosov Oleksandr
- 25,505
- 44
- 151
- 277
1
vote
1 answer
Stroking CGPath in swift
I'm trying to add a stroke to `CGPath` in a macOS app with the code below. The issue is that the stroked path can't be filled properly. With the current method, I'm adding the original path on top of the stroked path. This causes the overlapping…

thameem
- 11
- 1
- 3
1
vote
0 answers
wxpython GraphicsContext Regular font is always first loaded
Tested on Windows 10 only, may not be the same on other systems.
I want users to be able to download fonts and use them in my wxpython app, as such I have a sub-dir called "fonts" from which my app loads any ttf fonts at startup.
I have found that…

Giles
- 1,597
- 11
- 15
1
vote
1 answer
Trying to use GraphicsContext method Public void fill and strokepolygon in order to draw a regular polygon
I created a draw method in order to draw a regular hexagon using the fillPolygon and strokePolygon methods in java.Currently I am stuck trying to figure out how to get the six x and y coordinates needed to draw the regular polygon. Would anyone be…

lan
- 11
- 2
1
vote
1 answer
JavaFx animating a path with a shape
I am working on a project with a feature of animating a path with a line. So when I press a button, a line goes through all the circles in the canvas. But I see that there is a slight difference in my path and the strokeline. It doesnt go through…

Selva
- 11
- 1
1
vote
1 answer
How to show and hide Images on check/unchecking of a Checkbox?
I'm trying to have a few CheckBoxes visualize ingredients on a pizza in this javafx app. The Pizza is a ImageView. But I don't know how I will go about adding ingredients. Lets talk about salami for a second!
My first idea was to do this on my…

sonti yo
- 61
- 1
- 9
1
vote
0 answers
FXGraphics2D scale and canvas drawing in JavaFX
So I am developing an application using JavaFX that needs to display LateX formulas on a canvas. I managed to do just that using the revised version of this thread: Running swing application in javaFX.
So my next move was to draw a line under the…

Danilo Cardoso
- 11
- 3
1
vote
1 answer
GraphicsContext strokeLine method does not draw onto the Canvas as expected
When I use GraphicsContext's fillRect method. aA rectangle is drawn on the Canvas tilesetCanvas. I then go on to use the setStroke and strokeLine methods, but these methods aren't updating the canvas like the fillRect method. Is there a specific way…

Al G Johnston
- 129
- 2
- 10
1
vote
1 answer
How can i convert color picker value to a web or rgb or any Color class compatible type?
My color picker in javaFX returns something like 0x000000ff. How to convert this to web colors, either rgb or hex?

እስኬንድር ተናግረኁ
- 31
- 1
- 5
1
vote
1 answer
JavaFX: How to use the GraphicsContext method appendSVGPath(String svgpath)
I'm working on a project that makes use of SVG's. Currently the program has the SVG's stored as SVGPath objects in an FXML file. The file is then loaded into a Group which is then added to the screen. In the FXML file, there are approximately 300…

ectobar
- 13
- 1
- 4
1
vote
1 answer
Change color during the drawing on a NSBitmapImageRep
I implemented a methode that returns a NSBitmapImageRep. Onto that bitmap 10x2 rectangles should be drawn and each rectangle should be filled with the color cyan. But for each rectangle the cyan value should be increased by 12 (value starts at…

3ef9g
- 781
- 2
- 9
- 19
1
vote
2 answers
Why does my buffered GraphicsContext application have a flickering problem?
import wx
class MainFrame(wx.Frame):
def __init__(self,parent,title):
wx.Frame.__init__(self, parent, title=title, size=(640,480))
self.mainPanel=DoubleBufferTest(self,-1)
self.Show(True)
class…

Bibendum
- 502
- 4
- 7
- 18
1
vote
1 answer
GraphicsPath doesn't always refresh itself
The simple curve in this application only appears when it's dragged off the screen, or the window is resized. When the application just starts up it doesn't appear, and when the window is maximized or minimized it also disappears. However, all of…

Bibendum
- 502
- 4
- 7
- 18
1
vote
1 answer
Why doesnt my piece of code accept a color as parameter?
So I am trying to create something that draws axis on a canvas.
I want to set the color of the axis to red by using the setStroke method but it tells me that I am giving a wrong type parameter. The thing that puzzles me is that ,whilst using…

BURNS
- 711
- 1
- 9
- 20
1
vote
2 answers
Set graphics context to display UIImage (Obj-C)
I'm trying to render a UIImage in Objective-C (working on a simple iPhone app (breakout-type thing) to get used to the environment). However, I'm getting an "Error: CGContextDrawImage: invalid context" error when I try and draw it.
My question is:…

DashRantic
- 1,448
- 4
- 19
- 32