Exemplo n.º 1
0
    public void RotateTexture(bool clockwise)
    {
        var tex = WizardController.instance.RotateTexture(displayImage, clockwise);

        GetComponent <RawImage>().texture        = tex;
        GetComponent <RectTransform>().anchorMin = Vector2.zero;
        GetComponent <RectTransform>().anchorMax = Vector2.one;
        displayImage = tex;
        WizardController.instance.inputTexture = tex;
        GetComponent <ZoomImage>().UpdateRawImageAspect();
        HomographyImage.getInstance().GetTextureFromReference();
        HomographyImage.getInstance().GetComponent <ZoomImage>().UpdateRawImageAspect();
        HomographyImage.getInstance().aspect = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
        aspectSlider.value = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
    }
Exemplo n.º 2
0
 private void OnEnable()
 {
     if (!WizardController.instance.inputTexture)
     {
         return;
     }
     displayImage = WizardController.instance.inputTexture;
     GetComponent <RawImage>().texture = displayImage;
     GetComponent <ZoomImage>().UpdateRawImageAspect();
     if (HomographyImage.getInstance())
     {
         HomographyImage.getInstance().GetTextureFromReference();
         HomographyImage.getInstance().GetComponent <ZoomImage>().UpdateRawImageAspect();
         HomographyImage.getInstance().aspect = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
         aspectSlider.value = HomographyImage.getInstance().GetComponent <ZoomImage>().aspect;
     }
 }