Questions tagged [graphicscontext]
64 questions
0
votes
0 answers
Homemade Live linegraph - Canvas/Graphicscontext
I am attempting to make a live updating line chart similar to how an ecg or other monitors work. I've got a nice line getting drawn. It steps by 3 from left to right as new numbers are added.
The problem I'm having right now is to have it scroll…

Redracer68
- 958
- 1
- 7
- 12
0
votes
1 answer
C & X11 : how to use graphic contexts
I am confused about "graphic context"s, using the xcb library.
There are some examples around the www, they all show creating one single window with one single graphic context.
Of course when setting up several windows, each will have its own…

Karel Adams
- 185
- 2
- 19
0
votes
1 answer
How could the existence of `-saveGraphicsContext` and `-restoreGraphicsContext` be causing these issues in 10.10?
We have a custom NSPopUpButtonCell, and overriding this method:
- (void)drawBorderAndBackgroundWithFrame:(NSRect)cellFrame inView:(NSView*)controlView
{
[[NSGraphicsContext currentContext] saveGraphicsState];
CGFloat strokeWidth = 1;
…

A O
- 5,516
- 3
- 33
- 68
0
votes
1 answer
Rendering multiple models bug on DirectX 12
I am trying to render multiple models on DirectX 12 using only one graphic context, but the result is very weird and I have not much idea what is the reason. Rendering result of the sponza model from outside, the one on right is the correct result…

Michael Wei
- 185
- 2
- 10
0
votes
1 answer
Drawing a BarChart on a Canvas using GraphicsContext in JavaFX?
I am creating a BarChart in JavaFX with random data, and I have a fxml file with a designated canvas that I want to draw the BarChart on.
I am fine on creating the bar chart, but if I have (for example) a barChart object of type BarChart and the…

Ben
- 129
- 1
- 1
- 11
0
votes
0 answers
Eclipse plugin: gc.getCharWidth is giving different size when gc object changes
I am displaying text using gc.setText() method on canvas. But if the gc object changes then width of the text also changes.
I am applying the same font to GC using gc.setFont(font).
Font font = new Font(gc.getDevice(), fontFamily, (int) fontSize, …

ishan jain
- 681
- 3
- 10
- 27
0
votes
1 answer
JavaFx custom grid painting issue
I am using the below code to paint vertical lines on a JavaFX Canvas. Somehow the final lines(last 10%) have lower opacity. I have not changed any options(Transform/Effect on gc). I am attaching a screenshot for reference, any idea?
public class…

Aakash
- 1,860
- 19
- 30
0
votes
1 answer
How can I draw to a MemoryDC using the GraphicsContext, and then blit that to a PaintDC?
I'm looking to add double buffering to a drawing function like this.
dc = wx.PaintDC(self)
gc = wx.GraphicsContext.Create(dc)
#draw GraphicsPaths to the gc
I tried to first draw to a MemoryDC and then blit that back to the PaintDC:
…

Bibendum
- 502
- 4
- 7
- 18
0
votes
1 answer
Creating a basic OpenGl context
I'm reading the OpenGl red book, and I'm pretty much stuck at the first tutorial. Everything works fine if I use freeglut and glew, but I'd like to handle input and such myself. So I ditched freeglut and glew and wrote my own code. I've looked at…
user1502256
0
votes
1 answer
AttributeError: 'Style' object has no attribute 'fg_gc'
i'm working on a Gtk.DrawingArea because i want simply draw a rectangle.
I've cut and pasted the example of DrawingArea from Gtk examples, cutting off useless code for my purpose.
Here below the code (don't care about indentation problems, it's all…

FrancescoN
- 2,146
- 12
- 34
- 45
0
votes
1 answer
the function DrawEllipse from Python module wx.GraphicsContext works only in Windows but not in Linux
Hello People that are willing to help me,
I've written a small program that draws Covers for music. The program works fine on windows but i now have to run it on Linux and one function seems to make some trouble.
Note: I've really few knowledge…

Christian Kaiser
- 160
- 1
- 1
- 10
0
votes
0 answers
Capture image of landscape view in Portrait mode?
hope you will be doing fine.
I need to capture my View when I am in landscape orientation.
I am capturing gently in Portrait orientation, but when I switch to landscape orientation then only half of image I could capture.
I am doing something like…

iOmi
- 625
- 10
- 24
0
votes
0 answers
Strange behavior of CGLayerCreateWithContext on iPad 2 vs on the New iPad?
In a Single View App, FooView is the main view. In FooView's drawRect, if I do
if (!self.layer1) {
CGContextRef context = UIGraphicsGetCurrentContext();
NSLog(@"current context is drawRect is %@", context);
self.layer1 =…

nonopolarity
- 146,324
- 131
- 460
- 740
0
votes
1 answer
Is it certain that UIGraphicsBeginImageContext use CGBitmapContextCreate to create the graphics context?
Does UIGraphicsBeginImageContext use CGBitmapContextCreate to create a graphics context [update: I can't find it in the documentation], so the graphics context is exactly the same either way? I also tried to step into UIGraphicsBeginImageContext…

nonopolarity
- 146,324
- 131
- 460
- 740
0
votes
0 answers
On iOS, why do we have to create a layer using an existing Graphics Context?
Possible Duplicate:
On iOS, after we create a layer from context and get the layer's context, how do these contexts relate to each other?
On iOS, we could do a CGLayerCreateWithContext using the existing Graphics Context, and we would get a…

Jeremy L
- 3,770
- 6
- 41
- 62