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
In Firefox I can no longer access my Gmail account. When I click on Gmail from my Google home page it gives me this: https://accounts.google.com/b/0/UpdateEmail Verify New Email Address In order to verify that the new email address associated with yo [More]
In the course of working with photos in Lightroom, I've noticed a small user interface issue that can lead to confusion while deleting photos. In Explorer, a highlighted file is directly tied to any action selected via right click. For example, if I [More]
I opened a file that was created in CS4 in InDesign CS5. I have been working on it for a few days. I am now on page 39 and I am encountering a very annoying and puzzling problem. On that page, I had an image with a caption behing a text box that runs [More]
I purchased 12 month subscription to creative cloud, my computer was set back to factory settings, I have 6 months left with creative cloud, how do I get my programs back?CDoes your Cloud subscription properly show on your account page? If you have m [More]
Ok the basics are, I'm working with iMovie 4.0.1, Quictime 7.0.4 and video input from a vhs deck thru a Director's Cut DV converter box which is connected to my G4 via firewire and connected to the deck via the RCA jacks. When Previewing the tape all [More]
Can the directory ( where oracle db 9 is installed ) be deleted after the upgrade to 10g in a separate directory ? The tablespaces/customer data from db9 are also installed in separate directories.Typically there could be a number of interesting file [More]
Hi All, We have 2 Facts(F1,F2) which are connected to conformed dimensions (D1,D2,D3) and F1 is connected to another Dimension (D4) which does not have any connection with F2. Also D1,D2,D3 is conformed dimension to facts F3,F4,F5 In this scenario ho [More]
I keep getting vertical lines below each letter that I type when filling in things with Firefox 4. There is one line created for each letter.Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch [More]
Each time the computer receives updates, the proofing settings seem to revert to disabled. The settings getting reset are  - Check spelling as you type  - Mark grammar errors as you type  - Check grammar with spelling I only notice the issue in Word [More]
In Explorer only, getting a "object expected" char 1 error message for this line <script type="text/javascript"> var TabbedPanels1 = new Spry.Widget.TabbedPanels("TabbedPanels1"); </script> This is the page: http: [More]