AGK for Pascal
ContentsIndexHome
PreviousUpNext
TAgkCamera.Capture Method

Presents the user with an option to take a photo with the device camera, if available. This does not immediately capture the image.

Syntax
Pascal
class function Capture(const Owner: TAgkObject; const OnImageCaptured: TAgkImageEvent): Boolean; overload; static;
Parameters 
Description 
const Owner: TAgkObject 
the object that will become owner of the captured image (eg. a TAgkScene object). 
const OnImageCaptured: TAgkImageEvent 
this event will be fired when the user has finished capturing an image, or cancelled the operation. 

True if the capture dialog is shows, or False if the device has no camera or the camera is not available.

If the device does not have a camera, or otherwise cannot be used, this will return False and your app will continue as normal. Depending on the platform your app may continue running in the background whilst the user is taking a photo, or it may pause execution whilst the photo is taken. In any case you must assume your app continues running but is no longer visible 

When the user closes the dialog box, the OnImageCaptured event is fired. If the dialog box was cancelled, the Image parameter of this event will be nil. Otherwise, it will be the newly loaded image. 

TAgkCamera

Copyright (c) 2012. All rights reserved.