Questions tagged [graphicscontext]
64 questions
1
vote
1 answer
Split UIView/graphics context into areas
I am trying to print a UIView as a PDF.
The problem is that if the UIView is taller than a page it gets cut off.
So what I want to do is iterate over "page heights" of the UIView and render them each as a PDF page.
Here is my…

Thomas Clayson
- 29,657
- 26
- 147
- 224
1
vote
1 answer
Draw on a custom context
I'm actually trying to draw lines on a view. In order to not clear the context before every draws, I understood that I have to create my own context in order to draw on it.
I found this way to create a context :
CGContextRef MyCreateBitmapContext…

Seb
- 545
- 9
- 29
1
vote
1 answer
Trying to set unique CoreGraphics (iphone) States for each Stroke
I've got a number of 'line' objects -- each storing information about a line drawn using Core Graphics. The problem is, that though there may be several line objects each having a unique color and stroke width, all lines are getting drawn under the…

RexOnRoids
- 14,002
- 33
- 96
- 136
1
vote
1 answer
How to change background of SWT ExpandBar
I have an rcp application that has expand bars in it, and while the default colors and backgrounds look good in Windows 7, my clients who use Windows XP have quite an ugly looking application. I have looked around and I have seen many people with…

Will
- 292
- 4
- 16
1
vote
0 answers
On iOS, how do we get a graphics context cached on the GPU?
And maybe the first question is: is it useful or possible to get a graphics context cached on the GPU: On iPad 1, 2, and the New iPad, PowerVR is used as the GPU, and does it use the RAM as graphics memory? If so, can it and does it help if we get…

nonopolarity
- 146,324
- 131
- 460
- 740
1
vote
2 answers
Is the concept of a Graphics Context very similar to a file handle? (on iOS and other systems)
Sometimes the term Graphics Context is a little bit abstract. Are they actually system resource, but they are resource from the Graphics Card, just like a file handle is system resource from the hard drive or any permanent storage device?
Just as a…

Jeremy L
- 3,770
- 6
- 41
- 62
0
votes
1 answer
Adding a clipping path to a UIImage, saving the clipped version to the Documents folder, and then showing it
In my app, the user starts out with a UIImage. Based on user input, the app creates a clipping path around a certain part of the image. I then want to be able to save that clipped version to the app's Documents directory so that it can be shown at a…

maxedison
- 17,243
- 14
- 67
- 114
0
votes
0 answers
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 just say something like gc.scale(10); and it makes…

Raethexn
- 21
- 2
0
votes
1 answer
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 Main.java. But it seems like my code has a bug…
user10913773
0
votes
1 answer
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 applicationDidFinishLaunching(_ aNotification: Notification) {
var…

KeithB
- 417
- 2
- 12
0
votes
0 answers
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 GraphicsContext to OpenPDF?
Since I didn't found a direct…

user27772
- 522
- 1
- 4
- 18
0
votes
0 answers
Eclipse/SWT: Copy of image is shown as blank
I have the following code in an Eclipse plugin to take a screenshot and display two copies of the image. In the future, I'll be making some modification to the second copy, but for now just displaying an exact copy would be sufficient. However,…

Ares
- 1,411
- 1
- 19
- 35
0
votes
1 answer
JavaFX clipping produces a 'lottery scratch ticket'-Effect
I started playing with JavaFX GraphicsContext.
Especially the Clipping part is interesting to me.
so i tried to create some graphics and create a clipping mask for it (a simple rectangle, which moves around)
but i noticed some strange behaviour with…

lumo
- 790
- 1
- 8
- 23
0
votes
1 answer
JavaFX - draw donut
I need to draw a donut shape using JavaFX's GraphicsContext - a filled circle with a hole in the center, to clarify.
I have been searching and I can't find any examples online.
I think you'd use the fillarc function, but I do not understand it.…

MCMastery
- 3,099
- 2
- 20
- 43
0
votes
1 answer
Using TabPane in JavaFX
I'm switching from using a flowpane to a tabpane. I have no idea how to.
I want to use a canvas and a pane within the tabpane is this possible?
Below is my code without all the styling etc.
public View(TabPane root) {
this.root = root;
…

Georgina Beckett
- 87
- 7