本文整理汇总了C#中MediaPortal.GUI.Library.GUIImage.SetAnimations方法的典型用法代码示例。如果您正苦于以下问题:C# GUIImage.SetAnimations方法的具体用法?C# GUIImage.SetAnimations怎么用?C# GUIImage.SetAnimations使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.GUI.Library.GUIImage
的用法示例。
在下文中一共展示了GUIImage.SetAnimations方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderItem
/// <summary>
/// Method to render a single item of the filmstrip
/// </summary>
/// <param name="bFocus">true if item shown be drawn focused, false for normal mode</param>
/// <param name="dwPosX">x-coordinate of the item</param>
/// <param name="dwPosY">y-coordinate of the item</param>
/// <param name="pItem">item itself</param>
private void RenderItem(int itemNumber, float timePassed, bool bFocus, int dwPosX, int dwPosY, GUIListItem pItem)
{
if (_font == null)
{
return;
}
if (pItem == null)
{
return;
}
if (dwPosY < 0)
{
return;
}
bool itemFocused = bFocus == true && Focus && _listType == GUIListControl.ListType.CONTROL_LIST;
float fTextHeight = 0, fTextWidth = 0;
_font.GetTextExtent("W", ref fTextWidth, ref fTextHeight);
float fTextPosY = (float)dwPosY + (float)_textureHeight;
TransformMatrix tm = null;
long dwColor = _textColor;
if (pItem.Selected)
{
dwColor = _selectedColor;
}
if (pItem.IsPlayed)
{
dwColor = _playedColor;
}
if (!bFocus && Focus)
{
dwColor = Color.FromArgb(_unfocusedAlpha, Color.FromArgb((int)dwColor)).ToArgb();
}
if (pItem.IsRemote)
{
dwColor = _remoteColor;
if (pItem.IsDownloading)
{
dwColor = _downloadColor;
}
}
if (pItem.IsBdDvdFolder)
{
dwColor = _bdDvdDirectoryColor;
}
if (!Focus)
{
dwColor &= DimColor;
}
//uint currentTime = (uint) (DXUtil.Timer(DirectXTimer.GetAbsoluteTime)*1000.0);
uint currentTime = (uint)System.Windows.Media.Animation.AnimationTimer.TickCount;
// Set oversized value
int iOverSized = 0;
if (itemFocused && _enableFocusZoom)
{
iOverSized = (_thumbNailWidth + _thumbNailHeight) / THUMBNAIL_OVERSIZED_DIVIDER;
}
GUIImage pImage = null;
if (pItem.HasThumbnail)
{
pImage = pItem.Thumbnail;
if (null == pImage && _sleeper == 0 && !IsAnimating)
{
pImage = new GUIImage(0, 0, _thumbNailPositionX - iOverSized + dwPosX,
_thumbNailPositionY - iOverSized + dwPosY, _thumbNailWidth + 2 * iOverSized,
_thumbNailHeight + 2 * iOverSized, pItem.ThumbnailImage, 0x0);
pImage.ParentControl = this;
pImage.KeepAspectRatio = _keepAspectRatio;
pImage.ZoomFromTop = !pItem.IsFolder && _zoom;
pImage.ImageAlignment = _imageAlignment;
pImage.ImageVAlignment = _imageVAlignment;
pImage.FlipX = _flipX;
pImage.FlipY = _flipY;
pImage.DiffuseFileName = _diffuseFileName;
pImage.MaskFileName = _textureMask;
pImage.SetAnimations(_allThumbAnimations);
pImage.AllocResources();
pItem.Thumbnail = pImage;
pImage.SetPosition(_thumbNailPositionX - iOverSized + dwPosX, _thumbNailPositionY - iOverSized + dwPosY);
pImage.DimColor = DimColor;
_sleeper += SLEEP_FRAME_COUNT;
}
if (null != pImage)
{
if (pImage.TextureHeight == 0 && pImage.TextureWidth == 0)
{
//.........这里部分代码省略.........