Unity_UIWidgets study notes 03_ components _Image

1, Unity.UIWidgets.widgets.Image class constructor

public Image ( 
            Key Key = null , // a unique Id 
            ImageProvider Image = null , // pictures loader official NetworkImage, FileImage, AssetBundleImageProvider, MemoryImage 
            float ? width = null , // Image width 
            float ? height = null , // high picture 
            color = color null , // image color 
            the BlendMode colorBlendMode = BlendMode.srcIn, // mixed pixel method 
            BoxFit? Fit = null , // the picture fill mode
            Alignment = the Alignment null , // image display position 
            ImageRepeat REPEAT = ImageRepeat.noRepeat, // whether the image is repeated 
            Rect centerSlice = null , // set the internal image stretch, corresponding to a set inside the image in FIG .9, but it should be noted that this property should only be used in the case of the original image size is larger than the display of the picture, or else it will error 
            BOOL gaplessPlayback = false , // when ImageProvider changes, the process of reloading the picture, original picture whether to keep the show. true reservations, false representation does not retain, directly blank waiting for the next image is loaded 
            FilterMode filterMode = FilterMode.Point // image filtering mode 
        )

2, static methods

Image.asset: Unity resource file is loaded Resources and AssetBundle pictures
Image.file: Load from file
Image.network: loaded from the network
If the above method to modify the file into jpg gif file is loaded unsuccessful
Image.memory: loaded from memory
 
 

Guess you like

Origin www.cnblogs.com/PandaHome/p/11109051.html