Image

<Image x = "" y = "" w = "" h = "" pivotX = "" pivotY = "" rotation = "" src = "" srcid = "" alpha = "" align = "" antiAlias ​​= "" />
  • x, y: coordinates relative to the upper-left corner of the screen
  • w, h: width and height
  • pivotX:, pivotY center of rotation
  • rotation: angle of rotation, a week 360
  • src: Picture Name
  • srcid: picture sequence suffix number, usually with variable, you can display different pictures based on variables, if src = "pic.png" srcid = "1" will show the last picture "pic_1.png"
  • 0-255: alpha transparency, less than or equal to 0 is not displayed
  • antiAlias: ​​true / false anti-aliasing, if true picture does not have serrated deformation in the rotation, but the speed will be slow
  • srcExp: image source expression
  • srcFormat: image source format
  • srcForamtExp: image source format expression
  • srcParas: image source parameters
  • align / alignV: alignment has been described above.
  • mesh: m, nm and n is a constant, indicating that the picture is divided into m * n block
  • meshVerts: x0, y0, x1, y1, ... represent the vertex coordinates of the image block, a total of (m + 1) * (n + 1) vertices, the order from left to right, top to bottom. When a Mask mesh does not take effect.
  • mesh: deformation only supports the whole picture, there are srcW, nor limited effect when srcH image range.
  • Examples
    <Image x = "0" y = "- 1.5" mesh = "1,1" meshVerts = "0,0,600,0,0,1000, # touch_x, # touch_y" src = "test.png" />
    
    <Image x = "0" y = "# screen_height-323" src = "bottom_bg.png" />
    <Image name = "img" ...>
    <PositionAnimation>
      ...
    </ PositionAnimation>
    </ Image>
    
    // SrcExp: Image source expression
    <Image x = "210" y = "- 26" align = "center" srcExp = "'weather / weather_' + #weather_id +icon_suffix + '.png'" />
    

Digital Image

<ImageNumber number = "" src = "">
  • numeric expression number is to be displayed
  • src is the file name of the image source, support SourceAnimation
  • If the src = "number.png" number_0.png number_1.png ... will be used to create a digital image file. Time similar parts

Select Custom Picture Settings

Select any picture shows, reference http://www.miui.com/thread-2691964-1-1.html

Picture Mixed

<Group w = "# screen_width" h = "# screen_height" layered = "true">
     <Image x = "450" ​​y = "500" src = "a.png" />
     <Image x = "450" ​​y = "500" src = "b.png" xfermode = "src" />
</ Group>
  • xfermode layered and Group inside element used in conjunction with an increase in the property is designed to give xfermode only acts on Group internal elements.
  • When Group using layered, be sure to specify w, h, or can not take effect.
  • xfermode mixed mode, the value there: src, dst, src_over, dst_over, src_in, dst_in, src_out, dst_out, src_atop, dst_atop, xor.
  • In order to support mixed-mode xfermodeNum variable expression. The value of the expression corresponding to a hybrid model, src, dst, src_over, ... xor sequentially value 1,2.3 ... 11
  • A Group can have >= 2 diagram, the last of Image will have xfermode this in front of all the pictures in the group as a whole of the Image, in accordance with the value xfermode mixed therewith.
  • Note: The original image is dst, after adding the figure is src.
  • Example
    <Group w = "# screen_width" h = "# screen_height" layered = "true">
      <Image x = "300" y = "500" src = "test.png" />
      <Image x = "300" y = "500" src = "mask.png" xfermode = "dst_in" />
    </ Group>
    or
    <Group w = "# screen_width" h = "# screen_height" layered = "true">
      <Image x = "300" y = "500" src = "test.png" />
      <Image x = "300" y = "500" src = "mask.png" xfermodeNum = "6" />
    </ Group>
    Maybe an example to achieve the results are the same, are masking the effect that according to the shape of test.png mask.png cropped.
    
    Picture mixing see HTTP: http://www.miui.com/thread-2895063-1-1.html

results matching ""

    No results matching ""