C# Class MediaPortal.GUI.Library.GUIImage

A GUIControl for displaying Images.
Inheritance: GUIControl
Afficher le fichier Open project: MediaPortal/MediaPortal-1 Class Usage Examples

Private Properties

Свойство Type Description
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

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Private Methods

Méthode Description
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

Method Details

AllocResources() public méthode

Allocate the DirectX resources needed for rendering this GUIImage.
public AllocResources ( ) : void
Résultat void

Animate() protected méthode

This function will do the animation (when texture is an animated gif) by switching from frame 1->frame2->frame 3->...
protected Animate ( ) : void
Résultat void

Animate() public méthode

public Animate ( float timePassed, Animator animator ) : void
timePassed float
animator Animator
Résultat void

BeginAnimation() public méthode

public BeginAnimation ( ) : void
Résultat void

Calculate() protected méthode

Sets the state to render the image
protected Calculate ( ) : void
Résultat void

CanFocus() public méthode

Returns if the control can have the focus.
public CanFocus ( ) : bool
Résultat bool

Dispose() public méthode

Free the DirectX resources needed for rendering this GUIImage.
public Dispose ( ) : void
Résultat void

FinalizeConstruction() public méthode

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
Résultat void

GUIImage() public méthode

public GUIImage ( int dwParentID ) : System
dwParentID int
Résultat System

GUIImage() public méthode

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
Résultat System

GUIImage() public méthode

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
Résultat System

GUIImage() public méthode

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.
Résultat System

GUIImage() public méthode

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
Résultat System

GetCenter() public méthode

public GetCenter ( float &centerX, float &centerY ) : void
centerX float
centerY float
Résultat void

LockMemoryImageTexture() public méthode

public LockMemoryImageTexture ( Bitmap &bitmap ) : bool
bitmap Bitmap
Résultat bool

Refresh() public méthode

public Refresh ( ) : void
Résultat void

RemoveMemoryImageTexture() public méthode

public RemoveMemoryImageTexture ( ) : void
Résultat void

Render() public méthode

Renders the Image
public Render ( float timePassed ) : void
timePassed float
Résultat void

RenderRect() public méthode

public RenderRect ( float timePassed, Rectangle rectSrc, Rectangle rectDst ) : void
timePassed float
rectSrc Rectangle
rectDst Rectangle
Résultat void

ScaleToScreenResolution() public méthode

Does any scaling on the inital size\position values to fit them to screen resolution.
public ScaleToScreenResolution ( ) : void
Résultat void

Select() public méthode

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
Résultat void

SetBorder() public méthode

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
Résultat void

SetFileName() public méthode

Set the filename of the texture and re-allocates the DirectX resources for this GUIImage.
public SetFileName ( string fileName ) : void
fileName string
Résultat void

SetItems() public méthode

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
Résultat void

SetMemoryImageSize() public méthode

public SetMemoryImageSize ( int width, int height ) : void
width int
height int
Résultat void

SetPosition() public méthode

public SetPosition ( int dwPosX, int dwPosY ) : void
dwPosX int
dwPosY int
Résultat void

UnLockMemoryImageTexture() public méthode

public UnLockMemoryImageTexture ( ) : void
Résultat void

Update() protected méthode

protected Update ( ) : void
Résultat void

UpdateVisibility() public méthode

public UpdateVisibility ( ) : void
Résultat void