drawing

How Can I intercept high level GDI draw commands ?

Hello guys, I'm trying to make a application that allows remote access to other applications (running on different machines). The idea is to make give users transparent accesso to certain applications, I've basically two options: Application Streaming Intercepting draw command and reproduce them in the client (of course, the input i...

Problem with touchesMoved and drawRect.

I have a sticky bug that I can't seem to figure out, and I think it has something to do with the way touchesMoved is implemented. in touchesMoved, I check to see where the touch is (if statement) and then accordingly, call setNeedsDisplayWithRect on a 40 by 40 area near the touchpoint. What happens in DrawRect is that a black image ...

drawing a pixbuf onto a drawing area using pygtk and glade.

Hi, i'm trying to make a GTK application in python where I can just draw a loaded image onto the screen where I click on it. The way I am trying to do this is by loading the image into a pixbuf file, and then drawing that pixbuf onto a drawing area. the main line of code is here: def drawing_refresh(self, widget, event): #clear the...

Is there a way to draw lines (x,y)-(x2,y2) in ASP.NET pages?

Not animated of course, but good for displaying data visually such as Gantt chart etc. ...

Draw arrow on canvas tag

Hello, I want to draw an arrow using the canvas tag, javascript. I've made it using the quadratic function, but I'm having problems to calculate the angle of rotation of the arrow... Anyone have a clue on this? Thank you ...

Drawing an image in this method?

private void pictureBox1_MouseDown(object sender, MouseEventArgs e) { NumberOfBets++; if ((e.X >= 40 && e.X <= 125) && (e.Y >= 0 && e.Y <= 26)) { bettingStatus[0]++; for (int x; x < 10; x++) { Graphics graphic = (???) } } I'm trying...

Generate BitmapSource from UIElement

I am attempting to generate a BitmapFrame that is based on a UIElement. Here is my function: private BitmapFrame RenderToBitmap2() { RenderTargetBitmap renderBitmap = new RenderTargetBitmap(200, 200, 96, 96, PixelFormats.Pbgra32); DrawingVisual drawingVisual = new DrawingVisual(); DrawingContext drawingContext = drawingVisu...

OpenMP parallelization on a recursive function

I'm trying to use parallelization to improve the refresh rate for drawing a 3D scene with heirarchically ordered objects. The scene drawing algorithm first recursively traverses the tree of objects, and from that, builds an ordered array of essential data that is needed to draw the scene. Then it traverses that array multiple times to dr...

Draw panel on a web site?

What is best way for making a draw panel in a web page. I would like to know how to develop something very simple,for example little panel where users can draw a signature. This is great example drawhere.com, but I need something way simpler. Thanks ...

How can I make refreshing a control faster?

I have a custom control in C#. I have noticed that calling Refresh is much slower than I would like (about 0.1ms), even when I have an empty RePaint function. Basically, my application processes a grid and, one by one, it refreshes each grid cell. This rather inefficient behavior is by design; when enabled I want to be able to actuall...

Making a drawing program

I am making a drawing program, and have a few question with regards to that. I'll need the user to have the choice of drawing a rectangle, an oval and a line. I suppose I need to make a super class they all derive from. Should I make this an interface or an abstract class? And how would I set up that all the shapes have some default val...

Core Animation or OpenGL ES?

Hey, I want to do the following: Tap the screen and draw 3 cricles around the the tapped point. Is it better to do this with Core Animation or OpenGL ES? Where do I start? Regards ...

Drawing a blinking caret in Winforms

I'm developing a custom control, which most resembles a text area. I am drawing text, which works correctly, and accepting input which also works.. But I (the user) am left guessing where the caret is while I type, since I'm doing everything manually. How do I draw a blinking caret to show where I am currently typing? Is there a standard...

Draw Arc using javascript

Is there a way to draw an arc using points in JavaScript?? I need to draw an arc when I specify a group of points. ...

How To: Best way to draw table in console app (C#).

Hello there, I have an interesting question. Imagine I have a lot of data changing in very fast intervals. I want to display that data as a table in console app. f.ex: ------------------------------------------------------------------------- | Column 1 | Column 2 | Column 3 | Column 4 | --------------------...

UIView: how to do non-destructive drawing?

My original question: I'm creating a simple drawing application and need to be able to draw over existing, previously drawn content in my drawRect. What is the proper way to draw on top of existing content without entirely replacing it? Based on answers received here and elsewhere, here is the deal. You should be prep...

Partial transparency with C# .NET 3.5 WinForms?

I'm making a .NET 3.5 app with a form that draws a partially transparent black background. I'm overriding OnPaintBackground to accomplish this: protected override void OnPaintBackground( PaintEventArgs e ) { using ( Brush brush = new SolidBrush( Color.FromArgb( 155, Color.Black ) ) ) { e.Graphics.FillRectangle( brush, e....

graph viewer/drawer for c#?

Hello, Is there a good C# library for drawing/visualizing graphs? I'm talking about node-path visualization instead of line graphs or the like. (preferably native, not wrappers for pstricks or anything like that) Thank you ...

How do OpenGL contexts and device contexts work?

I'm new to U/I programming, and I'm trying to get started with OpenGL. When I run an example program which creates a new OpenGL window with GLUT, it works fine. Good. However, in the context of another program, where I have to respond to Draw events (on Windows), with a device context passed to me - and where I might not have GLUT ava...

Drawing part of a Bézier curve by reusing a basic Bézier-curve-function?

Assuming I'm using some graphic API which allows me to draw bezier curves by specifying the 4 necessary points: start, end, two control points. Can I reuse this function to draw x percent of the 'original' curve (by adjusting the control points and the end point)? Or is it impossible? Unnecessary information, should someone care: ...