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
how do I save JPG files from a disc to iphoto??Use the Import to Library.... command in iPhoto then navigate to the disc and follow the prompts.Read other 2 answers [More]
I keep encountering errors when I try to create a connection or change my password. Below are the error I get. During Change of Password: "An invalid connection key was specified. Please correct the connection key and try again." During Creating [More]
Hi, when i run the request "Rollback Run",i get the following error: +++++++++++++++++++++++++++++++++++++++++++++++ HR_6858_HRPROC_INV_PROC_NAME APP-PAY-06858: Invalid process name. Cause: an invalid process name, i.e. not in the following list [More]
hi As shown in the scenario (sc1) screencast at http://screencast.com/t/GA7OcgYZ the JDeveloper 11.1.2.0.0 Version Application wizard can fail sometimes, showing a "File Backup Error" dialog, with the message "Failed attempting to back up i [More]
Hi. I can't open png-files in PS CC. The following error message appears (Translated from Swedish): Can't fulfill your request because it's not the right type of document/file type. Can anyone help me with this, please? ThanksOkay I have gone over so [More]
in weblogic graphica admin console , in the deployment menu you find there are 2 options (1) stop application (2) re deploy application How does red deploy application works ? when you click on it ...it just refreshes ......I though it might ask for [More]
My bosses' computer got wiped yesterday and unfortunately he has no backups of his music. I'm trying to help him out by restoring his previous purchases on iTunes but it seems I've run into a little problem... He started the download (of all the prev [More]
Hi All, SELECT A~OI_SHNUM        A~FORWAGENT                A~ROUTE        A~SHTYP        A~DTSHP_EACT        A~/BIC/GTCLICENS        A~/BIC/GTCADD04        A~COMP_CODE        SUM( C~GRS_WGT_DL )        C~UNIT_OF_WT   INTO TABLE I_LAYONE   FROM ( ( / [More]
Hi, whenever I insert a disk into my disk drive on my macbook pro it spits it right back out. It doesn't matter if its a DVD or CD. Could this be a driver problem? I dont think anything is physically wrong. Thank you for your helpHi, Similar discussi [More]
I was wondering if anyone could explain to me why/how my Airport Extreme would change it's BSSID. Here's a scan that I took from my Mac: Patmos:builds rsalo$ airport -s                             SSID BSSID             RSSI CHANNEL HT CC SECURITY (a [More]