custom widget - camera

7 messages - 1524 views

I created a custom widget that is a jsr-135 camera viewport for taking pictures.  But after it gets onscreen, it only flickers a few times and is painted over by kuix.  It kind of looks like the camera widgets painting (direct canvas) is fighting with kuix on rendering the space.

does anyone else have any experience with this in kuix?  I've don't lots of camera/jsr-135 work, and even written these types of custom widgets for cameras in other frameworks, but i'm evaluating kuix to see if I can use it for a commercial project.

any help on this would be great, thanks!

-pandora

set a thread task to flush the camera view .

unfortunately it doesn't work like that. the camera view is a native thread outside of the user-application layer, constantly repainting on the canvas you pass to it as an argument, at the coordinates you pass it.  It just does it's thing until you call Player.stop() or some other state changing method.  So, something about it it making kuix do a bunch of repaints on top, then the camera trys to repaint on top, etc etc.  I just don't know if someone else has gone down this path

Kuix 1.0 actualy use a GameCanvas and flushGraphics() method to refresh the screen and it's not realy compatible with the VideoControl display. We are working on.

thanks for the reply Bo.  Ouch, well at least I know what's going on.  I guess for now i'll have to jump to a midp Form for camera integration :(

You can take a look at this snippet.

excuse, how can I put a camera into sreen ?  I use Bo's snippet ,put  the costom "public class Camera extends UnpaintableWidget{"  into xml , the sreen only show the title and camera ,the others is not shown!

any body tell me why ! thank you.