graphics

How do I force a UIImageView and its subviews to redraw in a new context?

kSBCanvas is a SBCanvas, which is a subclass of UIImageView. It has a few UIImageView subviews. It all renders great to the iPhone screen. I need composite the kSBCanvas and its subviews to an imageview that I want to write to disk. I do the following: UIGraphicsBeginImageContext(kSBCanvas.bounds.size); [kSBCanvas drawRect: [kSBCa...

What is maximium resolution of a html page?

I have few question in this regard When you create an internet page, does the program automatically create 75pdi? Could we create 300DPI page could this be able communicate on internet ? What is maximum DPI resolution you can get on a Web page? ...

Avoiding Calls to floor()

I am working on a piece of code where I need to deal with uvs (2D texture coordinates) that are not necessarily in the 0 to 1 range. As an example, sometimes I will get a uv with a u component that is 1.2. In order to handle this I am implementing a wrapping which causes tiling by doing the following: u -= floor(u) v -= floor(v) Doing...

Image not showing in IE but is showing in Mozilla - Odd

Hi All, If you look at this link: http://www.internetworld.co.uk/g/2010/ExhibLogos/ExhibID_137_Graphic1.jpg. In IE8, it doesn't show. In Mozilla it does. I have no idea as to what would cause this issue as this is just a bog standard jpg. This is also happening for other companies other than ourselves on the same site. Can anyone shed ...

Ratio of multipass textures compared to the color map

I have 4 textures used in a multi-pass effect with the color map at the highest quality - which for this example is 512x512. Currently the Normal, Specular & Parallax maps are the same dimensions. The additional maps are taking a significant portion of VRAM. This seems incredibly wasteful. My intention is to reduce the size of the multi...

Pixel color replacement working fine on simulator but not on iPhone

Hi, I am dealing with an iphone application which would choose a specific colored pixel from the image and replace it with some other color shades i choose from color menu. Problem is that the code i have implemented is working fine on simulator, but when i run the same code on device all i get is that, the image's pixels are replaced b...

How to change current Plot Window Size (in R)

For example. Assume I do: dev.new(width=5, height=4) plot(1:20) And now I wish to do plot(1:40) But I want a bigger window for it. I would guess that the way to do it would be (assuming I don't want to open a new window) to do plot(1:40, width=10, height=4) Which of course doesn't work. The only solution I see to it would be t...

Problems positioning Flash graphic drawn with Graphics Class

I'm using Flash CS3 to build a simple drawing application. When the user clicks a button, they select a particular movieclip. After clicking elsewhere on the stage, the clip is instantiated and added to the stage at the position of the cursor. I've also added the option of being able to click on the added clip and drag it around on the s...

How can I create a hardware-accelerated image with Java2D?

I'm trying to create a fast image generator that does lots of 2d transformations and shape rendering, so I'm trying to use a BufferedImage and then acquire the Graphics2D object to perform all my drawing. My main concern now is to make is really fast so I'm creating a BufferedImage like this: GraphicsEnvironment ge = GraphicsEnvironment...

Data display with 3d graphs in Java?

Can you please recommend a library that can draw a simple (see the image) 3D graph in Java? The library should comply with the following requests: it has to be freely available for non-commercial use it should be simple to use (given a set of data, it should draw a 3D graph) when drawn, users should be able to do basic control over...

Where's Polygon.Double in Java?

Once again I'm doing Java graphics (Graphics2D) but I noticed there is no Polygon.Double or Polygon.Float classes whereas there is Rectangle2D.Float and Rectangle2D.Double class. Does anyone know why this is? I just need to draw a triangle using doubles as points. ...

Problem : iPhone graphics go mad !

Helloo! I faced a really stranged problem recently. I am doing a timetable organizer, and I draw each event in a DayViewController with Quarz 2D, then I add a "glass effect" picture (PNG). But randomly, as I switch between days, the layout go really bad. Here is a link to see the good appearance and below the bad one : http://toucotton...

Graduate degree help changing career to Graphics Engineer?

I've been out of school for 2 years and have always enjoy computer graphics. I'm currently an IT programmer and would like to make the change into computer graphics. I'm currently working on a side project which is an iPhone game using opengl. I wanting to know peoples opinion on what might be the best route into making the change. I'm ...

Drawing a scatterplot with Cocoa

How should I best approach drawing a scatter plot diagram in Cocoa? ...

High-End 2D Java (SE) Graphics Library

I am looking for a high-end graphics library for Java Standard Edition. I know some fairly low-level libraries: AWT/Swing, JOGL, SDL. Are/is there an alternative? My requirements are (atleast): Anti-aliased Fullscreen support Alpha channel Blend modes and Z-depth Rasterized Effects: (motion) blur, glow, gloom, etc. And, optionally: ...

Resized image degrades in quality.

I resized an image using Java2D Graphics class. But it doesn't look right. BufferedImage resizedImage = new BufferedImage(IMG_WIDTH, IMG_HEIGHT, type); Graphics2D g = resizedImage.createGraphics(); g.drawImage(originalImage, 0, 0, IMG_WIDTH, IMG_HEIGHT, null); g.dispose(); Is it possible to scale an image without intro...

Anybody know of a collection of country outline maps?

I've been in doubt whether to ask this here, but I don't know where else to go and I think any answers can be useful to other developers... What I want to do in the community site that I am building is to have a map outline graphic on the header of the user profile. So if the user indicates he is from Brazil, there will an small outline...

Using the contents of an array to set individual pixels in a Quartz bitmap context

I have an array that contains the RGB colour values for each pixel in a 320 x 180 display. I would like to be able to set individual pixel values in the a bitmap context of the same size offscreen then display the bitmap context in a view. It appears that I have to create 1x1 rects and either put a stroke on them or a line of length 1 ...

Detecting Singularities in a Graph

I am creating a graphing calculator in Java as a project for my programming class. There are two main components to this calculator: the graph itself, which draws the line(s), and the equation evaluator, which takes in an equation as a String and... well, evaluates it. To create the line, I create a Path2D.Double instance, and loop thro...

Equivalent of ClientRectange in ASP.NET page.control

I am using a 3rd party library for some GDI+ drawing capabilities where the method to actually implement the drawing takes a Graphics object and a Rectangle object as parameters. In the Paint event of my WinForms application I can then execute: externalLibrary.Draw(e.Graphics, ClientRectangle); When implementing the same thing in ASP...