graphics

On Mouse Over change Sprite Graphics Color: AS3

Hi, I have created a sprite as below: var arrowHeadRight:Sprite = new Sprite(); with(arrowHeadRight.graphics){ beginFill(0xDDDDDD, 1); moveTo(50,0); lineTo(0,50); lineTo(50,100); lineTo(50,0); endFill(); } On Mouse Over, I wish to change the color of the fill on this shape? Can this be done or do I have to re-...

Dragging an object along a drawn path

Same as the question: I need to drag a component along a programmatically drawn path composed by different kinds of graphic, like lines, curves, etc. I've already googled it, but with no success. Any ideas? thanks! ...

Calculate outerline by a rounded Rectangle

Hello, I paint a rounded rectangle with a spezified stroke and then i try to paint a single line around this rectangle. But at the edges it never really matches each other. g.setStroke(new BasicStroke(radius + .5f)); g.drawRoundRect(x + radius/2, y + radius/2, width - radius, height - radius, radius, radius); // Outer bord...

Error Importing Graphics Python

I'm typing at the console from graphics import * and I get this error Traceback (most recent call last): File "<pyshell#1>", line 1, in <module> from graphics import * ImportError: No module named graphics ...

off screen drawing in android

hi, is there off screen drawing possible in android like a imageContext in objective C. if it is kindly tell me the link or some kind of hint. thanks a lot. ...

vb6: graphics question

hi, i'm wondering if the following could be done easily with vb6: load a transparent bitmap (eg. gif or png) - 2 colors change its color display several instances in different colors do this layered + different drawmodes so what i want is overlapping instances in different colors and drawmodes. i know it could be done using the poly...

How can I reproduce a scribbly pattern like this in code?

I made this graph in wolfram alpha by accident: Can you write code to produce a larger version of this pattern? Can you make similar looking patterns? Readable code in any language is good, but something that can be run in a browser would be best (i.e. JavaScript / Canvas). If you write code in other languages, please include a scr...

In LaTeX is there a way to include the filename of a graphic into a caption?

I have a LaTeX document with a large number of drawings included from external files with \includegraphics{bla.pdf}. The drawings are done in Inkscape. This all works fine. However sometimes it is hard to keep track of all the drawings and their source files. Hence I'm looking for a way to include the source file name, in the example...

How to concate/combine two bitmaps and make them one image in android.

Can anyone tell me how to combine or concatenate two bitmap images into one in android? ...

Drop lines from actual to modeled points in R

Yesterday I worked up an example of the difference between Ordinary Least Squares (OLS) vs. Principal Components Analysis (PCA). For that illustration I wanted to show the errors minimized by OLS and PCA so I plotted the actuals, the predicted line and then I manually (with GIMP) drew in a drop line to illustrate a couple of the error te...

Graphics - overlapping bug or what?

Hey, I have quite a big code here... But fortunately it is not needed to be mentioned at all. It comes down to something which... fails? So, in the end this is supposed to draw two triangles (using AS3 Graphics). It works fine with one, but when I put a second there, it looks weird. I trace debugged it, and I think the bug is in the Gra...

OpenGL: Set position instead of translating?

Can I set the current render position to be an arbitrary value, instead of just giving it an offset from the current location? This is what I'm doing currently: gl.glTranslatef(3.0f, 0.0f, 2.0f); It allows me to say "I want to move left" but not "I want to move to point (2, 1, 2)". Is there a way to do the latter? I'm using OpenGL w...

Parsing .obj files: How to do materials/textures?

Hello, I'm new to OpenGL. I'm playing around with it using JOGL. I'm using this model. I am successfully rendering it to the window. However, I would like to apply textures/materials. I'm not entirely sure how to do this. From the .obj file: f 6307/4525/3 6303/4524/3 6327/4523/3 6315/4526/3 usemtl kahki_light_pave_W.png f 6445/3470/3...

Per Pixel lighting in modern GLSL?

I'm looking for a proper simple example. Right now I had something based on a tutorial but I don't see variations in the middle of the triangles. It appears each triangle changes color but only in whole. out vec3 vertex_normal; out vec3 vertex_light_position; .. on the vertex shader. with vertex_normal = normalize(NormalM...

I'd like to begin learning game programming, where to start?

Possible Duplicate: Learning game programming I'm fairly fluent in C/C++ and ObjC languages and would like to venture into game programming. I've always sort of wanted to do this but never really had the time, but now I do and I'm ready to learn! My goal is to start out and make a simple 2D game on the iPhone (Doesn't have to ...

SVG to SWF Conversion

I need to convert many .svg images into swf format. I can do this be opening the .svg in Adobe Illustrator and exporting to swf but this is very time consuming. Are there any free command line utilities out there that will convert .SVG to .SWF? I have already tried SWFMill with no success. I have also downloaded Ming but cannot compile t...

Java, how to draw constantly changing graphics

Have not done this before, so obviously I suck at it. Here 64 pixels around current mouse position get drawn little bigger on a form. Problem is, that it's 'kind of' to slow, and I have no idea where to start fixing. Besides that, I made a thread, that constantly calls update graphics when it's finished and a little fps like text, to sh...

OpenGL: Choose which poly face is forwards?

I'm new to OpenGL. I'm using Java/JOGL. I'm having difficulty with polygon faces. I want to be able to control which side is the front or back. I've been working through this documentation. I thought this line of code, in my display() method, would make all poly faces be drawn, but it had no effect: gl.glPolygonMode(GL.GL_FRONT_AND_BA...

Where can I find OpenID Buttons?

Yahoo offers OpenID buttons on this webpage: http://developer.yahoo.com/openid/loginbuttons.html I was wondering if Google / Aol and other providers have similar graphics that I can use on my webpage. If so, where can I find them? Otherwise, am I alllowed to just photoshop the logos of these companies into my own graphic? ...

how to draw constantly changing graphics

Have not done this before (except in java, look how Steve McLeod fixed it), so obviously I suck at it. Here 64 pixels around current mouse position get drawn little bigger on a form. Problem is, that it's 'kind of' to slow, and I have no idea where to start fixing. Besides that, I made a timer thread, that constantly calls update graphi...