Documentation

Una is developed by Una Technologies Limited

All rights reserved

© 2022 Una Technologies Limited

Print

Change the Camera Direction

Rotate photo clockwise by 90 degree

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><block type=\"Camera_rotatePhoto\" disabled=\"true\" x=\"158\" y=\"292\"><field name=\"direction\">RotationDirection.Clockwise</field><field name=\"degree\">RotationDegree.Ninety</field></block></xml>"}
				
			

This is used to change the direction of the image or photo.

Parameters: Image

      • clockwise (Default)/anticlockwise
      • 90 (Default)/180

Output: Image
Sample code:

				
					{"blocks":"<xml xmlns=\"https://developers.google.com/blockly/xml\"><variables><variable>photo1</variable></variables><block type=\"pxt-on-start\" x=\"0\" y=\"0\"><statement name=\"HANDLER\"><block type=\"variables_set\"><field name=\"VAR\">photo1</field><value name=\"VALUE\"><shadow type=\"math_number\"><field name=\"NUM\">0</field></shadow><block type=\"Camera_takePhoto\"/></value><next><block type=\"Camera_showPhoto\"><value name=\"photo\"><block type=\"variables_get\"><field name=\"VAR\">photo1</field></block></value><next><block type=\"Camera_showPhoto\"><value name=\"photo\"><block type=\"Camera_rotatePhoto\"><field name=\"direction\">RotationDirection.Clockwise</field><field name=\"degree\">RotationDegree.Ninety</field><value name=\"photo\"><block type=\"variables_get\"><field name=\"VAR\">photo1</field></block></value></block></value></block></next></block></next></block></statement></block></xml>"}
				
			

The output:

Next Snapshot