66 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
130
views
Why does copying an SWT Image before its GC is disposed result in a blank/black image?
Using eclipse SWT. When I draw on an image, and then create a copy of it before disposing of the GC, the copied image does not contain the new drawing.
My goal was to create an original image (image1),...
2
votes
1
answer
78
views
How can I extract a value from inside a SwiftUI Canvas closure?
I need the 'size' value provided by Canvas' GraphicsContext closure, outside of the closure, but no matter what I do, whatever happens in Vegas... I mean whatever happens in Canvas, stays in Canvas - ...
1
vote
2
answers
128
views
How to get the size of Text when building a custom Shape
This is a follow-up to my question How to fill a Path in a Canvas using a Material style where the comment was made, why use a Canvas when a Shape would be easier?
One difference between a Canvas and ...
1
vote
2
answers
254
views
How to fill a Path in a Canvas using a Material style
A Canvas receives a GraphicsContext as closure parameter and this can be used to draw and fill shapes.
If a path is filled with a Material style, it just fills with (almost) solid black, instead of ...
0
votes
0
answers
112
views
Get Skia Commands from Chromium DisplayItemList
Please suggest how can I intercept or extract SKIA commands from a running Chromium instance so that same can be replayed on another browser.
Saw this in another thread asking the same problem
How to ...
2
votes
1
answer
73
views
How to clear an inclined rectangle in JavaFX Canvas efficiently?
Currently I have the following problem:
I would like to draw a straight angled line in JavaFX Canvas like so (Recalling from memory so method names might not be accurate):
Canvas canvas = new Canvas(...
-1
votes
1
answer
373
views
How clear rect in GraphicsContext of SwifUI
In My example, I draw a rect use GraphicsContext.
Canvas { context, size in
context.fill(
Path(CGRect(
x: 0,
y: 0,
width: 300,
height: 200
...
1
vote
1
answer
355
views
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 ...
1
vote
0
answers
113
views
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 ...
0
votes
0
answers
513
views
How do you scale up the size of a polygon?
I'm new to java and I want to change the size of my polygon while maintaining the aspect ratio. How do I scale up my shape without needing to change all the vertices manually 1 by 1? I would like to ...
0
votes
1
answer
123
views
ContextGraphics draw image drawing nothing in Java
I have two classes in my project. Main.java and Village.java. The class Main.java is supposed to pass a GraphicsContext object to Village.java so that it draws some image on the Application frame of ...
user avatar
user10913773
0
votes
1
answer
146
views
Graphics Context is Twice as Big as Expected
I am developing a Swift MacOS app for drawing. The following subset of my code shows my problem.
import Cocoa
class AppDelegate: NSObject, NSApplicationDelegate {
func ...
0
votes
0
answers
184
views
Create PDFs with OpenPDF, JavaFX and GraphicsContext?
Obviously, we can draw AWT graphics via Java AWT's Graphics2D directly to OpenPDF using PdfGraphics2D.
I wonder if there is also a possibility allowing to draw JavaFX graphics via JavaFX's ...
1
vote
1
answer
233
views
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 ...
-1
votes
2
answers
753
views
I cannot get JavaFX GraphicsContext strokeText() to display monospaced fonts right
Question: I would like for the GraphicContext object to stroke the text in a monospaced font. How can this be achieved?
Problem: I am using JavaFX. I have a Canvas object and a GrahpicsContext object....