draw

Path2D fill and draw algorithm

Hi, Does somebody know the algorithm that is been used to fill or draw a Path2D (GraphicsPath in .NET) object with a Graphics2D-object (Graphics in .NET). The algorithm isn't public in the Java-sources and .NET isn't public at all. I want to use it for some fast image-operations. Thnx ...

How to draw a gradient line (fading in/out) with Core Graphics/iPhone ?

I know how to draw a simple line: CGContextSetRGBStrokeColor(context, 1.0, 1.0, 1.0, 1.0); CGContextMoveToPoint(context, x, y); CGContextAddLineToPoint(context, x2, y2); CGContextStrokePath(context); And I know how to do a gradient rectangle, i.g.: CGColorSpaceRef myColorspace=CGColorSpaceCreateDeviceRGB(); size_t num_locations = 2; ...

Draw a line on specific data value on cartesian chart in Flex

Hi, Is there a way to draw a line on a graph (or at least get the position) on specific date? I have a graph where X is Date data, I want to draw a line with a text on each Year and each 3 months as reference, not part of the graph series. thanks. ...

ExtTextOut fails with very long strings unless lower font quality specified

Sometimes our application needs to draw very long strings (e.g. 6,000 chars) using ExtTextOut. Sometimes ExtTextOut fails and returns zero and GetLastError returns zero as well. To re-create the situation create a simple MFC Single Document application and then set the OnDraw to be: void CTestExtTextView::OnDraw(CDC* pDC) { CTestExtTe...

How to show x and y axes in a MATLAB graph?

I am drawing a graph using the plot() function, but by default it doesn't show the axes. How do we enable showing the axes at x=0 and y=0 on the graph? Actually my graph is something like: And I want a horizontal line corresponding to y=0. How do I get that? ...

API for displaying video and drawing 2D elements

I'm looking for a Windows library/SDK that will allow me to do the following: Display video from a network stream Draw 2D elements on the displayed image in real time, such as lines, circles, text, etc. Use it in a commercial application (I don't mind paying for it) I'm willing to use any programming language or environment so there'...

how to draw 3d sphere?

I want to draw a 3d ball or sphere in html 5.0 canvas. I want to understand the Algorithm about how to draw 3d sphere. Who can share this with me? Thanks in advance ! ...

Draw a random line.Set CGPoint nil ? - Objective C

Hi, I use ccTouchesBegan and ccTouchesEnded to draw a line. I want to draw a line when i drag the cursor(or finger) on screen. That mean, when i release the cursor, it will draw a line with the first point is the position which i has a first touch (ccTouchesBegan) and last point which i have when release (ccTouchesEnded). Here is my code...

iphone: Drawing over MKMapView?

Hi guys I'm attempting to draw polygons on a mapView. What I did was to add a transparent view on the main view, that matches the bounds of the mapView, and I draw over it. When I move the table it's ok, but when I zoom in and out the polygones 'bounce' on the Y axis (latitude) but the x axis is ok. What do you think? BTW I tried to a...

iphone sdk: I have a Quartz Drawing problem

Hi guys, I have a view (MKMapView) and on it I've a transparent view on which I draw different things. Now I would like to give the user the option to erase things so that the "background view" (the mapView) will be seen in the erased places. Do you think it's possible? Thanks ...

LPD3DXFONT DrawText using DT_CALCRECT?

How do I use DT_CALCRECT to determine my rectangle bottom and right coords? e.g I have this rect: RECT textPos; textPos.left = 100; textPos.right = 100; What do I do next to calculate the rect and draw the text? ...

Line is erased when drawing shapes

Hi, I am trying to make an application for drawing shapes on screen by touching it. I can draw a line from one point to another- but it erases on each new draw. Here is my code: CGPoint location; CGContextRef context; CGPoint drawAtPoint; CGPoint lastPoint; -(void)awakeFromNib{ //[self addSubview:noteView]; } -(void)touchesMoved...

Flash AS3 BitmapData.draw() affects text formating

Hi! I need to display antialiased systemfonts (because the swf filesize must be small, therefore i can't embedd fonts). So I wrote this script in order to manually antialias the text Code: public function renderTextField():BitmapData{ var w:int = this["mainTextField"].textWidth+10; var h:int = this["mainTextField"].textHeight+10;...

Draw bold/italic text with PIL?

How to draw bold/italic text with PIL? ImageFont.truetype(file, size) has an option to specify font size only. ...

Weird problem with a site layout on IE 7

Hi, I have a website which draws white (empty) content/text on IE 7. However, as soon as I mouse over links, they will appear, or if I open up an about box and move it above the content, the content will then be drawn. Does anyone have any ideas what this is about? I can't supply source as this is private. the site works across all web ...

Drawing area at Google Map.

Please see the image : Any idea how to do that? drawing an area. ...

Android draw with blur

Hi, I need do draw on Android's Canvas using Blur effect, it is a very simple feature, I need to draw a circular area, which is blurred (the foreground) and the background transparent, I can do everything with manipulating the colour alpha to do it with custom transparency but I need it to be blurred instead of transparent.. any ideas...

Scaling a 2D polygon with the mouse

Hi, I develop a Python-based drawing program, Whyteboard (https://launchpad.net/whyteboard) I'm developing features to allow the user to rotate and scale a polygon that they draw. Here's my problem: I have a Polygon class containing a list of all points, which is "closed off" at the end. Users can select drawn shapes in my program, wh...

My drawRoundRect is not drawing a rounded rectangle :( [Flash]

Hi everyone, I just wrote a Background class for a new project. The background is basically going to be 2 rounded rectangles with a simple stroke and fill color laid on top of each other. Anyways right now I'm just trying to draw out 1 rounded rectangle, but for some reason I don't see it anywhere on stage :( No errors and my traces tra...

Drawing in Flash using PHP

Hi, Is it possible to draw shapes in a flash animation at runtime through PHP? If so, how can this be achieved? ...