draw

New to Android - Drawing a view at runtime

HI all, I'm just getting started with developing for Android. I'm looking to port one of my iPhone applications, but I'm kind of at a loss for how to draw a view at runtime (a view not declared in the XML). Basically, I want to draw a simple rectangle, but then be able to manipulate its frame after being drawn. Sorry if this is a real...

AS3 change lineStyle of existing line

Hi all im drawing a line from 0,0 to 100,100 im using this to modify the linestyle: draw_line.graphics.lineStyle(1, 0xFF0000); That line is now of 1 thickness. Is there anyway i can change the thickness of the line to say 10, but without redrawing the line? ...

C# design question (Connections)

Hello, I would like to hear your suggestions on kind of design problem which I have in c#. So, I am making a program where people can meet and draw in the same window over the internet or LAN. I am drawing into a bitmap and than I set it to a pictureBox component. I have a hard time to decide how to send updates to each user, what is ...

How to use bmpdata.draw(component); on Flex 4 SPARK components?

So I try to say bmpdata.draw(backgroundRect); to dray on my Bitmap my component but Flash Builder gives me this and I do not know what to do... 1067: Implicit coercion of a value of type spark.primitives:Rect to an unrelated type flash.display:IBitmapDrawable. Flex Problem Please help ...

How do you draw a line from one corner of the stage to the other?

I am completely perplexed. I asked this question and it (any mentioned solution) doesn't seem to be working at all. All I want is to draw a line from one corner to the other. Here again is the link to the SWF file I have (it's embedded in an HTML document): test.html Here is the source: package { import flash.display.Sprite; ...

Help: Android paint/canvas issue; drawing smooth curves

How do I get smooth curves instead of dots or circles, when I draw with my finger on the touch screen, in Android? I am using the following code- public class DrawView extends View implements OnTouchListener { private static final String TAG = "DrawView"; List<Point> points = new ArrayList<Point>(); Paint paint = new Paint(); public D...

General zoom algorithm for drawing program

My GUI toolkit, wxPython provides some methods for implementing a user zoom factor, however the quality isn't too good. I'm looking for ideas on how to create a zooming feature, which I know is complicated. I have a bitmap representing my canvas which is drawn to. This is displayed inside a scrolled window. Problems I forsee: - perf...

Draw a smooth line with finger touch on iPhone

Hello Everyone, How do I draw a smooth line with a finger slide/touch motion on the iPhone? I have the following code but it is not smooth. It makes corners/turns for example when I try to do a circle. I think I have to use OpenGL. Any ideas? sample code? tutorials? Thanks! UIGraphicsBeginImageContext(self.view.frame.size); [draw...

How to change text color on Macintosh? My code uses TESetText and TEUpdate for drawing.

A naive question - i am a novice on mac programming. How to change text color on Macintosh? My code uses TESetText and TEUpdate for drawing. PS - Mac is really really badly documented. ...

PHP Application Flow Graph (or function call graph)

Happens that I've ended up working on a big PHP program and I need a program (or easy to install script) which draws a flow control/call graph of a PHP application (ie; must work over multiple PHP files). Already saw stuff like Graphviz, not sure which one works for PHP? Any suggestions? Cheers! ...

Creating and rendering an image dynamically with transparent background for use with drawImage

Could someone provide an example of how to dynamically create an image in Java, draw lines et cetera on it, and then draw the image so that areas not painted will remain transparent in the drawing process? ...

Is there a way to change the draw order in WPF

Is there a way to change the draw order of Controls in a StackPanel without changing the actual ordering of these controls in the StackPanel? The reason I ask is that we have a button bar with margin 0 between the buttons. The active button grows (ie margin set to -10) overlapping the neighbouring buttons. The problem here is that the r...

How do I draw the points in an ESRI Polyline, given the bounding box as lat/long and the "points" as radians?

I'm using OpenMap and I'm reading a ShapeFile using com.bbn.openmap.layer.shape.ShapeFile. The bounding box is read in as lat/long points, for example 39.583642,-104.895486. The bounding box is a lower-left point and an upper-right point which represents where the points are contained. The "points," which are named "radians" in OpenMap, ...

The simplest way to draw points on iPhone ?

Hello, in my app I have 49 points with x,y and I wnat to display them on the screen. I've seen a lot of library that can help me (core plot, s7graphview, etc.). But since I'm doing very basic stuff (just draw points), what is the simplest way do to that ? Thanks ! ...

How to draw lines manually in reporting services scatter chart

How to draw lines manually in reporting services scatter chart? Please help me to draw line in scatter chart.If you could help me that would be the greatest help for me ...

draw line with php using coordinates from txt file

I have file A2.txt with coordinate x1,y1,x2,y2 in every line like below : 204 13 225 59 225 59 226 84 226 84 219 111 219 111 244 192 244 192 236 209 236 209 254 223 254 223 276 258 276 258 237 337 in my php file i have that code. This code should take every line and draw line with coordinate from line. But something wa...

How to draw to screen in c++ ?

How would I draw something on the screen ? not the console window but the entire screen, preferably with the console minimised. Also, would it show up on a printscreen ? What I want to do is create something like a layer on top of the screen that only me and my aplication are aware of yet still be able to use aplications as usual. Here...

get bitmap from textview in android

I want to get the bitmap that is drawn when a textview is displayed but without displaying the textview in the activity. something like this: TextView t = new TextView(this); t.forceToDrawItself(); Bitmap b=t.getViewBitmap(); how is this possible? ...

Android - drawing path as overlay on MapView

Hello, I have a class that extends Overlay and implemments Overlay.Snappable. I have overriden its draw method: @Override public void draw(Canvas canvas, MapView mv, boolean shadow) { Projection projection = mv.getProjection(); ArrayList<GeoPoint> geoPoints = new ArrayList<GeoPoint>(); //Creating geopoints - ommited for read...

iPhone CGContext: drawing two lines with two different colors

I am having some troubles using the CGContext with an iPhone app. I am trying to draw several lines with different colors, but all the lines always end up having to color, which was used last. I tried several approaches I could think of, but haven't been lucky. I set up a small sample project to deal with that issue. This is my code, I...