graphics

What is an efficient algorithm to copy pixels that are inside a quadrangle?

I have two bitmaps, and I want to copy pixels from A to B only when the pixels are inside an area defined by four corners (a quadrangle). Bitmap A and B are the same size and the quadrangle is defined as four {x,y} coordinates in the pixel space of the image. Worst case scenario I can test the center of each pixel against the quad to se...

OpenGL Newbie - Best way to move objects about in a scene

I'm new to OpenGL and graphics programming in general, though I've always been interested in the topic so have a grounding in the theory. What I'd like to do is create a scene in which a set of objects move about. Specifically, they're robotic soccer players on a field. The objects are: The lighting, field and goals, which don't cha...

Naming points of a R graphic

Hello, I would like to name some points of a R graphic, got from the basic function plot(). More precisely I have a 2-dimensional parametric function t -> (a(t),b(t)), and I plot the points (a(t),b(t)). I would like to print the value of t corresponding to each point. Thank you ...

Where does the .x and .y property of a Sprite in actionscript 3.0 measured from? from the centre of the object? or.....?

Hi all, Where does the .x and .y property of a movieclip in actionscript 3.0 measured from? from the centre of the object? or.....? For instance, given a pro grammatically drawn Sprite: graphics.beginFill(0x000000); graphics.moveTo(9.00000000,-7.00000000); graphics.lineTo(13.00000000,0.00000000); gr...

Working in java image

Dear All, I will explain my question clearly. I need to zoom in/zoom out the world map. When I click on the particular country in map, control should redirected to new page with respective the country. I dont have any idea about this in java. Please explain the steps to acheive the above task. ...

Recommend a good book for learning 3d graphics programming/maths?

Hi there, I'd like to start delving into 3d graphical coding but don't really have the requisite mathematical background, I was wondering if anyone might be able to recommend a good book that teaches the maths in a manner that's designed for someone new to the topic. I'd appreciate any suggestions, thanks in advance. ...

How to put textures in one file (power of 2)

Hey I want to create big texture which is power of 2 and put in this file a lot of smaller textures. You know, I have several textures which are not power of 2 so I cant load them to my program. I have to put them in one file (512x512 for example). Do you know any program which can do it for me automaticly? Is there any limit of size o...

ActionScript LineStyle Color Changing Prematurely

i'm attempting to draw lines beside each other, but the last line from the first color group takes on the color from the second color group before the second color is assigned. can anyone explain this? function drawCorner() { var corner:Sprite = new Sprite(); corner.graphics.beginFill(0x0, 1.0); corner.graphics.drawRect...

Can you join GIFs and/or Animated GIFs into a single Animated GIF?

Hey everyone, Does anyone know if it's possible to join several gifs or animated gifs into one animated gif (ie. concat the frames together into one master animated gif)? I'd like to have some server side function to do this. The file will be identical in dimensions, mode etc, just their content will differ. Thanks! ...

LaTeX \includegraphics and textline

Ok, I am beat. I tried a few things but I am unable to make this happen. I need some help now. I want to be able to have some text and picture side by side (only one line, thus no need for wrapping or other fun. The picture is small enough to fit in a text line): This is a text <temp.jpg placed center to the textline> Problem is, when...

Optimizing Java Graphics

Hello, I have a custom UI drawn for my java application. Right now I draw the entire UI from scratch. I know for a fact some parts of the UI are static. I know I could save these static parts to an image, but will this yield a improvement in performance (Since even an image must be drawn every frame)? Is it plausible to save a refer...

Unexpected "Bitmap Region is already Locked" exception with GetEncoderParameterList. Any ideas?

I'm trying to use this sample code from Microsoft to determine what encoder options are available for the JPEG encoder. (The real problem I'm trying to solve is to see if I can set the Chroma subsampling parameters explicitly) http://msdn.microsoft.com/en-us/library/bb882589.aspx private void GetSupportedParameters(PaintEventArgs e) { ...

Are there any Javascript graphics libraries that support visio-like diagram creation and editing?

I am thinking about creating a website that as part of its functionality will allow users to create visio-style diagrams. Are there any Javascript libraries/frameworks that already provide this functionality? Or libraries/frameworks for other in-browser technologies such as flash, silverlight etc? I know there are lots of graphic libr...

What is the correct way to perform alpha blending? (C)

Hi, I'm writing a very simple graphics library, and I'm trying to figure out how to do alpha blending. I tried it a few times, but my results were less than satisfactory. According to Wikipedia, I should do: Value = (1-alpha)*Value0 + alpha*value1 This, however is not working at all. Maybe I'm doing something wrong? The code I've inc...

how to release the bmp control that is taken by a graphic object in c#?

i have this code Bitmap bmp1, bmp2, bmp3,bmp4; Graphics gp2,gp3; if (bmp2 == null) { bmp2 = new Bitmap(pictureBox1.Height, pictureBox1.Width); } gp2 = Graphics.FromImage(bmp2); // Rectangle rect = new Rectangle((float)(pictureBox1.W...

Javascript Draw line with jQuery

Please see my code here http://jsbin.com/ijoxa3/edit var drawHorizondalLine = function(x1,y1,x2,y2, color) { var width = Math.abs(x1 - x2); var posX = (x1 > x2) ? x1 : x2; var id ='c_'+new Date().getTime() var line = "<div id='"+id+"'class='line'>&nbsp;</div>"; $('body').append(line);...

good c# 3D rendering engines

Possible Duplicate: Best 3D Graphics Engine for .NET Hello everyone, I'm an Indie developer and I'm in need of a good rendering engine for c# (Do not point me to Unity3D please, I want to be in control of my entire application and not just scripting and working in unity's proprietary editor) I really like Truevision3D but th...

Drawing in Java without a JPanel

I'm writing a graphical user interface to plot data on a xy-axis. It's written in Java Swing so I have a JFrame that contains the whole GUI. One of the components of the GUI is a JPanel that makes up the area where the data is plotted. I use Graphics2D to do my drawing. I'm trying to make a command line extension of this program. Th...

Convert a quadratic bezier to a cubic?

What is the algorithm to convert a quadratic bezier (with 3 points) to a cubic one (with 4 points) Thanks ...

Does GetPath() return cubic or quadratic bezier control points?

Microsoft's docs say: Specifies that the corresponding point in lpPoints is a control point or ending point for a Bèzier curve. PT_BEZIERTO values always occur in sets of three. The point in the path immediately preceding them defines the starting point for the Bèzier curve. The first two PT_BEZIERTO points are...