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
Is it possible to install Oracle 10g on Windows 2008 64bit . I read one post below it says , windows 2008 is not certified for oracle 10g .. windows server 2008 Oracle 10G 64 bit before I installed 32bit , it is throwing error message on alert log fi [More]
Is it possible to customize the existing or build new Word templates to be used when publishing to Word? Thanks! RoryHi Kari, I'm not sure if you've come across these other references: Creating printed versions of Adobe Captivate projects http://www. [More]
My Printer began working fine, now it is suddenly stalling and cancelling the print job in the middle of printing.  Please let me know what I can do to fix this issue.Hi @mgsamuel,  I would be happy to help you with your Officejet 8600. I understand [More]
Sony mini DV camera cannot transfer video with fire wire that came with a camera. From all accounts looks as if I need i.LINK wire - can any anyone tell me if it is a 4 pin to 4 pin or 4 pin to 6 pin wire?Hi Jeff: Welcome to the discussions! ;-0 You [More]
Hi, When i am trying to install 9i version on linux after 17% at copying of file naeet.o installation get stucked. Please help me for fix this issue. thanks Nirav<snip> Please let me know complete details so not going to find any issue while install [More]
My iPhone 5 synced normally at first.  Now when I try to backup and sync with iTunes, it beeps continually (like trying to charge) and will not sync.  Lighning/USB cord is Apple.I'd start with the following document with that one: iPhone, iPad, iPod [More]
After I installed Mavericks I cannot drag and drop images from other applications or from the web into keynote: instead of the image, it imports a link. I need to prepare a class!If you are using the newly downgraded Keynote 6, go back to Keynote 5.3 [More]
Pros: •          Conversion of images for export of assets from PS works well •          Reflow interface is quite sophisticated and the GUI makes it really easy to conceptualize the how your composition will flow when resizes with all the breakpoint [More]
Hi, i had taken a tablespace offline. so the active transactions data will go to SYSTEM rollback segment. SYSTEM tablespace will use this rollback segments for transactions instead of undo. am i right? now i dropped the tablespace. so how much time t [More]
     Hi, I have a serous problem with Premier Pro. This is the message: Please, can somebody help me? Thank you. [Moved from the general Cloud forum to the specific Program forum... Mod]look if this matches? A guide to repair projects that get a "Tic [More]