zoukankan      html  css  js  c++  java
  • 【小部件】touchgfx 之 《Texture Mapper & Animated Texture Mapper》

    纹理贴图器和动画纹理贴图器

    介绍

    从TouchGFX 4.12.3开始

    Texture MapperAnimation Texture Mapper能够绘制变换图像的窗口小部件,即可以自由地缩放和旋转围绕调节原点。透视印象也可以通过应用虚拟相机来实现,其中透视量也可以调整。

    本文将逐步介绍创建和配置Texture Mapper/ 的步骤  Animation Texture Mapper

    • 此小部件仅在4.12.3及更高版本中可用。
    • 此小部件对MCU负载有重大影响。
    • 此小部件不支持每像素颜色深度1位。

    HiglightedTextureMapper.png

    Texture Mapper 在TouchGFX Designer中的“图像”下。

    重要属性 

    位置 设置xywidthheight和  visible的性能Texture Mapper
    也可以设置是否  Texture Mapper 将生成为Animation Texture Mapper
    图片 设置应该转化的的形象xy 在小部件中的图像的位置。
    角度和比例

    设置 应该显示的图像  的x, y, z角度和。scaleTexture Mapper

    角度以弧度设置。

    奥里戈

    设置  x, y, z origo图像旋转和缩放的范围。
    x, y origo 与“纹理映射器”的宽度和高度有关,而不与所选图像的宽度和高度有关。

    z origo 相对于。camera distance. 如果将camera distance设置为1000,并且图像应围绕其自身的中心旋转,则  zorigo也应设置为1000。

    相机

    设置camera distance. 此选项可在旋转图像时更改透视量。 

    出现

     配置rendering algorithmalpha

    用法

    当  选择Texture MapperAnimation Texture Mapper并将其放在TouchGFX Designer画布上时,上表中的属性用于配置  Texture MapperAnimation Texture Mapper

    位置

    textureMapperLocation.png

    在TouchGFX Designer中修改位置属性

     通过调整“位置”下的属性来确定Texture Mapper/ 的面积  Animation Texture Mapper。要设置位置,请设置坐标属性,x 并  y确定Texture Mapper/ 角左上角的Animation Texture Mapper位置。大小由属性确定的widthheight
    根据Texture Mapper/ 的大小裁剪转换后的图像  Animation Texture Mapper。为了使图像完全可见,Texture MapperAnimation Texture Mapper 应该足够大以容纳转换后的图像。
    这也可以将部件从改变  Texture Mapper 到Animation Texture Mapper,通过把一个对勾复选框与标签“动画纹理映射”。

    • 如果将旋转或缩放交互应用于持续时间或延迟大于零的“纹理映射器”,则还将生成为“动画纹理映射器”。

    图片

    textureMapperImage.png

    在TouchGFX Designer中修改图像属性

    通过调整“图像”下的属性,可以设置要变换的图像及其位置。坐标属性x ,  y确定图像左上角的位置。要将图像锁定在Texture Mapper/ 的中心,  Animation Texture Mapper请在复选框中打上带有“锁定图像至中心”标签的复选框。 

    • 如果在运行时调整纹理映射器/动画纹理映射器的大小,则此选项不会保持图像的居中位置。

    Origo和相机

    textureMapperOrigoCamera.png

    在TouchGFX Designer中修改Origo和Camera属性

     在“ Origo”和“ Camera”下的属性中设置Origo和Camera  Texture MapperAnimation Texture Mapper

    Origo确定应在其周围进行所选图像转换的位置。坐标特性x 和  y可相对于纹理映射器的宽度和高度与相对于所选择的图像的宽度和高度。
    坐标属性  z 是相对于camera distance. 如果camera distance设置为1000,并且图像必须绕它自己的轴  zORIGO也应设置为1000。

    为了在中心锁定位置变换  Texture Mapper/Animation Texture Mapper,在带有“锁定origo到中心”标签的复选框中打勾。这会将x and  y 属性锁定在  Texture Mapper/ 的中心,  Animation Texture Mapper 并将该z 属性锁定在  / 的值  camera distance。  

    • 如果在运行时调整纹理贴图器/动画纹理贴图器的大小或更改了相机距离,则此选项不会保持居中的变换位置。

    相机距离决定了获得的透视量,较低的值将导致较大的透视图,而较高的值将导致较少的透视图。

    请参阅下图,直观地了解Texture Mapper/中使用的坐标系  Animation Texture Mapper

    ordinateSetup.png

    用于Texture Mapper / Animation Texture Mapper中的Origo和相机距离的坐标系

    回呼

    如果将Texture Mapper 设置为a  Animation Texture Mapper,则将调用两个回调:  textureMapperAnimationStepCallback &textureMapperAnimationEndedCallback

    textureMapperAnimationStepCallback 每当当前动画执行一个步骤时,就会调用。

    textureMapperAnimationStepCallback 所有动画结束时调用。

     
    来源
  • 相关阅读:
    uniGUI中Cookies使用中文汉字的方法(使用EncodeString函数编码)
    Delphi中accesss实现树形结构查询系统(一次性生成比较方便)
    delphi的万能数据库操作
    Delphi汉字简繁体转换代码(分为D7和D2010版本)
    “千千静听”滚动标题栏,非常简单!(时间器控制窗口标题栏文字,然后赋值给Application.Title)
    js 创建对象
    SkyWalking+SkyApm-dotnet分布式链路追踪系统
    可靠的连接池
    调整数组顺序使奇数位于偶数前面
    三种「高可用」架构
  • 原文地址:https://www.cnblogs.com/skullboyer/p/12202752.html
Copyright © 2011-2022 走看看