C# Класс MediaPortal.GUI.Library.GUIImage

A GUIControl for displaying Images.
Наследование: GUIControl
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
Cleanup void
DrawBorder void
FinalizeBorder void
FreeResourcesAndRegEvent void
GUIPropertyManager_OnPropertyChanged void
OnListTexturesDisposedEvent void
OnPackedTexturesDisposedEvent void
ParseParameters int[]
ReleaseTexture void
UnsubscribeAndReleaseListTextures void
UnsubscribeListTextures void
UnsubscribeOnPropertyChanged void

Открытые методы

Метод Описание
AllocResources ( ) : void

Allocate the DirectX resources needed for rendering this GUIImage.

Animate ( float timePassed, Animator animator ) : void
BeginAnimation ( ) : void
CanFocus ( ) : bool

Returns if the control can have the focus.

Dispose ( ) : void

Free the DirectX resources needed for rendering this GUIImage.

FinalizeConstruction ( ) : void

This function is called after all of the XmlSkinnable fields have been filled with appropriate data. Use this to do any construction work other than simple data member assignments, for example, initializing new reference types, extra calculations, etc..

GUIImage ( int dwParentID ) : System
GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, Color color ) : System
GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, Color color, int border, int strBorderPosition, bool borderTextureRotate, bool borderTextureRepeat, Color borderColor ) : System
GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, long dwColorKey ) : System

The constructor of the GUIImage class.

GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, long dwColorKey, int border, int strBorderPosition, bool borderTextureRepeat, bool borderTextureRotate, long dwBorderColorKey ) : System
GetCenter ( float &centerX, float &centerY ) : void
LockMemoryImageTexture ( Bitmap &bitmap ) : bool
Refresh ( ) : void
RemoveMemoryImageTexture ( ) : void
Render ( float timePassed ) : void

Renders the Image

RenderRect ( float timePassed, Rectangle rectSrc, Rectangle rectDst ) : void
ScaleToScreenResolution ( ) : void

Does any scaling on the inital size\position values to fit them to screen resolution.

Select ( int frameNumber ) : void

If the texture holds more then 1 frame (like an animated gif) then you can select the current frame with this method

SetBorder ( string border, BorderPosition position, bool textureRepeat, bool textureRotate, string textureFilename, long colorKey, bool hasCorners, bool cornerTextureRotate ) : void
SetFileName ( string fileName ) : void

Set the filename of the texture and re-allocates the DirectX resources for this GUIImage.

SetItems ( int iItems ) : void

If the texture has more then 1 frame like an animated gif then you can specify the max# of frames to play with this method

SetMemoryImageSize ( int width, int height ) : void
SetPosition ( int dwPosX, int dwPosY ) : void
UnLockMemoryImageTexture ( ) : void
UpdateVisibility ( ) : void

Защищенные методы

Метод Описание
Animate ( ) : void

This function will do the animation (when texture is an animated gif) by switching from frame 1->frame2->frame 3->...

Calculate ( ) : void

Sets the state to render the image

Update ( ) : void

Приватные методы

Метод Описание
Cleanup ( ) : void
DrawBorder ( bool flip ) : void
FinalizeBorder ( ) : void
FreeResourcesAndRegEvent ( ) : void
GUIPropertyManager_OnPropertyChanged ( string tag, string tagValue ) : void
OnListTexturesDisposedEvent ( object sender, EventArgs e ) : void
OnPackedTexturesDisposedEvent ( object sender, EventArgs e ) : void
ParseParameters ( string valueText ) : int[]
ReleaseTexture ( string file ) : void
UnsubscribeAndReleaseListTextures ( ) : void
UnsubscribeListTextures ( ) : void
UnsubscribeOnPropertyChanged ( ) : void

Описание методов

AllocResources() публичный Метод

Allocate the DirectX resources needed for rendering this GUIImage.
public AllocResources ( ) : void
Результат void

Animate() защищенный Метод

This function will do the animation (when texture is an animated gif) by switching from frame 1->frame2->frame 3->...
protected Animate ( ) : void
Результат void

Animate() публичный Метод

public Animate ( float timePassed, Animator animator ) : void
timePassed float
animator Animator
Результат void

BeginAnimation() публичный Метод

public BeginAnimation ( ) : void
Результат void

Calculate() защищенный Метод

Sets the state to render the image
protected Calculate ( ) : void
Результат void

CanFocus() публичный Метод

Returns if the control can have the focus.
public CanFocus ( ) : bool
Результат bool

Dispose() публичный Метод

Free the DirectX resources needed for rendering this GUIImage.
public Dispose ( ) : void
Результат void

FinalizeConstruction() публичный Метод

This function is called after all of the XmlSkinnable fields have been filled with appropriate data. Use this to do any construction work other than simple data member assignments, for example, initializing new reference types, extra calculations, etc..
public FinalizeConstruction ( ) : void
Результат void

GUIImage() публичный Метод

public GUIImage ( int dwParentID ) : System
dwParentID int
Результат System

GUIImage() публичный Метод

public GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, Color color ) : System
dwParentID int
dwControlId int
dwPosX int
dwPosY int
dwWidth int
dwHeight int
strTexture string
color Color
Результат System

GUIImage() публичный Метод

public GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, Color color, int border, int strBorderPosition, bool borderTextureRotate, bool borderTextureRepeat, Color borderColor ) : System
dwParentID int
dwControlId int
dwPosX int
dwPosY int
dwWidth int
dwHeight int
strTexture string
color Color
border int
strBorderPosition int
borderTextureRotate bool
borderTextureRepeat bool
borderColor Color
Результат System

GUIImage() публичный Метод

The constructor of the GUIImage class.
public GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, long dwColorKey ) : System
dwParentID int The parent of this GUIImage control.
dwControlId int The ID of this GUIImage control.
dwPosX int The X position of this GUIImage control.
dwPosY int The Y position of this GUIImage control.
dwWidth int The width of this GUIImage control.
dwHeight int The height of this GUIImage control.
strTexture string The filename of the texture of this GUIImage control.
dwColorKey long The color that indicates transparancy.
Результат System

GUIImage() публичный Метод

public GUIImage ( int dwParentID, int dwControlId, int dwPosX, int dwPosY, int dwWidth, int dwHeight, string strTexture, long dwColorKey, int border, int strBorderPosition, bool borderTextureRepeat, bool borderTextureRotate, long dwBorderColorKey ) : System
dwParentID int
dwControlId int
dwPosX int
dwPosY int
dwWidth int
dwHeight int
strTexture string
dwColorKey long
border int
strBorderPosition int
borderTextureRepeat bool
borderTextureRotate bool
dwBorderColorKey long
Результат System

GetCenter() публичный Метод

public GetCenter ( float &centerX, float &centerY ) : void
centerX float
centerY float
Результат void

LockMemoryImageTexture() публичный Метод

public LockMemoryImageTexture ( Bitmap &bitmap ) : bool
bitmap Bitmap
Результат bool

Refresh() публичный Метод

public Refresh ( ) : void
Результат void

RemoveMemoryImageTexture() публичный Метод

public RemoveMemoryImageTexture ( ) : void
Результат void

Render() публичный Метод

Renders the Image
public Render ( float timePassed ) : void
timePassed float
Результат void

RenderRect() публичный Метод

public RenderRect ( float timePassed, Rectangle rectSrc, Rectangle rectDst ) : void
timePassed float
rectSrc Rectangle
rectDst Rectangle
Результат void

ScaleToScreenResolution() публичный Метод

Does any scaling on the inital size\position values to fit them to screen resolution.
public ScaleToScreenResolution ( ) : void
Результат void

Select() публичный Метод

If the texture holds more then 1 frame (like an animated gif) then you can select the current frame with this method
public Select ( int frameNumber ) : void
frameNumber int
Результат void

SetBorder() публичный Метод

public SetBorder ( string border, BorderPosition position, bool textureRepeat, bool textureRotate, string textureFilename, long colorKey, bool hasCorners, bool cornerTextureRotate ) : void
border string
position BorderPosition
textureRepeat bool
textureRotate bool
textureFilename string
colorKey long
hasCorners bool
cornerTextureRotate bool
Результат void

SetFileName() публичный Метод

Set the filename of the texture and re-allocates the DirectX resources for this GUIImage.
public SetFileName ( string fileName ) : void
fileName string
Результат void

SetItems() публичный Метод

If the texture has more then 1 frame like an animated gif then you can specify the max# of frames to play with this method
public SetItems ( int iItems ) : void
iItems int
Результат void

SetMemoryImageSize() публичный Метод

public SetMemoryImageSize ( int width, int height ) : void
width int
height int
Результат void

SetPosition() публичный Метод

public SetPosition ( int dwPosX, int dwPosY ) : void
dwPosX int
dwPosY int
Результат void

UnLockMemoryImageTexture() публичный Метод

public UnLockMemoryImageTexture ( ) : void
Результат void

Update() защищенный Метод

protected Update ( ) : void
Результат void

UpdateVisibility() публичный Метод

public UpdateVisibility ( ) : void
Результат void