Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Camera Source Fill problem
Started by kleu060 May 27 2015 06:26 PM

1 reply to this topic
[TOPIC CONTROLS]
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

kleu060

[GLOBAL: userInfoPane.html]
kleu060
  • Observer

  • 1 posts
  • Corona SDK

Hi

 

I am trying to make Rectangle on the screen which fill by the front camera .

 

I have try the below code and it doesn't seems to work on a Android phone.  It  displays a white rectangle on the screen.  Please help all Corona SDK experts

 

if ( system.getInfo("environment") ~= "simulator" ) then

display.setDefault( "cameraSource", "front" ) --front-facing camera
--display.setDefault( "cameraSource", "back" ) --back-facing camera
end

local rect = display.newRect( 200, 200, 300, 300 )
rect.fill = { type = "camera" }

 

I get above code from https://docs.coronalabs.com/api/type/ShapeObject/fill.html

 

Many Thanks



[TOPIC: post.html]
#2

bjsorrentino

[GLOBAL: userInfoPane.html]
bjsorrentino
  • Veteran

  • 8,506 posts
  • Corona SDK

Hi @kleu060,

The camera "fill" method is only available for iOS at this time, as noted on the documentation page where you pulled the sample from:

 

Camera Source — used to fill an object with the device camera source (iOS-only).

 

Best regards,

Brent




[topic_controls]
[/topic_controls]