Sitemap

Amicuk Programming Answers

Painting on canvas in native cocoa

2015-10-11   Views:0

Advertisement

Hi Friends, I need a make a java canvas in which i have to paint thumbnail images by native cocoa code. I had got drawing surface(ds) and drawing surface interface(dsi).Also i am able to read the thumbnail images but donot know how to paint images in

Hi Friends,
I need a make a java canvas in which i have to paint thumbnail images by native cocoa code.
I had got drawing surface(ds) and drawing surface interface(dsi).Also i am able to read the thumbnail images but donot know how to paint images in canvas using cocoa.
Please suggest and if possible give some example or code sample.
Thanks in advance.

The replay answer
Advertisement
the bare minimum to render to a fullscreen frame in the fastest way possible...
Frame f = new Frame();
f.getGraphicsConfiguration().getDefaultDevice().setFullScreenWindow(f);
f.createBufferStrategy(2);
BufferStrategy bs = f.getBufferStrategy();
Random r = new Random();
while(true)
   Graphics g = bs.getDrawGraphics();
   g.setColor(new Color(r.nextInt));
   g.fillRect(0,0,getWidth(),getHeight());
   g.dispose();
   bs.show();
}

Go to See the other 9 answers

Painting on canvas in native cocoa

Category:DefaultRelease time:2015-10-11Views:130

Hi Friends, I need a make a java canvas in which i have to paint thumbnail images by native cocoa code. I had got drawing surface(ds) and drawing surface interface(dsi).Also i am able to read the thumbnail images but donot know how to paint images in[More]

Python and PyObjC, developing native Cocoa apps rapidly!

Category:DefaultRelease time:-0001-11-30Views:130

Python is all grown up it seems for developing native OS X applications. For those who want to check out how to rapidly put together native Cocoa apps in less than half the lines of code and none of the manual memory management of the C derivative la[More]

How to Achieve Oil Painting on Canvas Effect?

Category:DefaultRelease time:-0001-11-30Views:130

A friend took a picture of an portrait of her grandfather painted in oil on canvas.  She has asked me to "Photoshop" the picture so that the canvas effect shows up in the picture.  I use PSE 8 in Win 7.  Thanks.Filter>Texture>Texturizer>[More]

Won't paint to canvas

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I know this is a bit of a chunk of code but it is all beginner stuff. I posted earlier on this. It won't paint with the to the canvas. Any help very much appreciated. Warby package Stejava; import javax.swing.*; import java.awt.*; import java.awt[More]

Painting on Canvas or Applet?

Category:DefaultRelease time:-0001-11-30Views:130

1) I have been writing an RPG for some time using j2sdk1.4.1_01 in windowsxp, The main component I'm drawing on is now a Canvas but was originally an Applet, Which is a better choice to use? I am using a double buffering system with VolatileImage and[More]

Image drawing in cocoa

Category:DefaultRelease time:2015-10-11Views:130

Hi Friends, I need a make a java canvas in which i have to paint thumbnail images by native cocoa code. I had got drawing surface(ds) and drawing surface interface(dsi).Also i am able to read the thumbnail images but donot know how to paint images in[More]

Native Canvas Painting and Refresh

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a project where I get live video from a firewire camera, and paint it to an awt Canvas natively using JNI. I need additional items painted on the canvas (on top of the video), like a pair of crosshairs and rulers to measure certain widths,[More]

Painting 2 rectangles in one canvas

Category:DefaultRelease time:-0001-11-30Views:130

Is there a way in which I can paint 2 rectangles ? I create 1 Painter object, and then call the rect method twice follow by repaint(), in the hope to paint 2 rectangles inside 1 canvas, but only 1 rectangle is painted. Can anyone help me ... Thanks p[More]

Convert photo to oil on canvas?

Category:DefaultRelease time:2015-10-11Views:130

Is there a way to do this? I've played around with some of the filters and stuff - artistic, sketch, water colors, etc - as well as some of the background layer options in some of these filters as well. I'm just not that familiar with how they all wo[More]

How to smooth lines of original oil painting

Category:DefaultRelease time:2015-10-11Views:130

I had an artist paint an oil painting (on canvas) of our wedding venue to use as part of our wedding invitation. However, I didn't realize how an oil painting would print on paper and the brush strokes are nonuniform and visible. How can I smooth out[More]

Change origin of canvas

Category:DefaultRelease time:-0001-11-30Views:130

hey, i have a canvas that positions itself in the middle of the screen with two lines (x and y axis). the problem is that i want to be able to move the origin, which then draws the axis again. thanks Pedge // GCanvas.java import java.awt.*; import ja[More]

Hot
It's been a busy week that also saw the TECHNET WIKI SUMMIT 2015 Then we had the results for February's TechNet Guru competition ALSO posted! http://blogs.technet.com/b/wikininjas/archive/2015/03/19/technet-guru-february-2015.aspx Below is a summary [More]
Am having a problem updating my vault. I have Aperture 3.0.1 and a single 25GB library. Vault has always worked in v 2.1.4. Since upgrading, I've not had any crashes and things seem to be working pretty well. However, my vault shows it needs to be up [More]
How can I get 1750 songs on my 8GB iPOd Touch?You would have to have songs with smaller file sizes. Reduce the quality of the files and you can save some room.Read other 2 answers [More]
I created an icloud account and now my text messages say that they are from my email account, and when someone sends me an email it is showing as a text?  How can I fix this to indicate a text is from my cell and emails go to email not text???See my [More]
Hi,    I had configured ADS in EP and when am trying to test through <b>"http://<Server>:<Port>/AdobeDocumentServices/Config"</b> but it is showing me an error "<b>An error has occurred. Maybe the request is no [More]
Hi, We are looking to implement manufacturing for our dough making facility of a retail restaurant chain. I would like to know 1.Which solution suits the best for us Oracle Process manufacturing or Discrete manufacturing??? 2.How OPM ties to Purchasi [More]
I'm trying to convert some music videos for use on my iPhone using "Create iPod or iPhone version" and I've noticed that while the conversion works fine, the resulting files are not placed in my iTunes library -- they're filed away correctly in [More]
I updated my clock in my digital camera for daylight savings time. My Olympus C-770 uses a 24 hour clock so 6pm would be 1800. However; when I import a picture taken at 1800 it says 5pm instead of 6 pm. Why doesn't iPhoto show the correct time? My Ma [More]
Hi, I'm using external classes e.g. struts as a MVC framework. Using JavaDoc to create the API documentation causes lots of the following warnings: warning - Cannot find class de.ewe.ikdb.action.ActionForward Actually the class in question is form st [More]
In Win 7, I am building a Labview project.  Where should I store the user selected system specific configuration files for the app operation?  Things like data directories, log file directories, etcIf you mean your own build application WHat I do in [More]