本文整理汇总了C#中MediaPortal.GUI.Library.GUIImage.Render方法的典型用法代码示例。如果您正苦于以下问题:C# GUIImage.Render方法的具体用法?C# GUIImage.Render怎么用?C# GUIImage.Render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MediaPortal.GUI.Library.GUIImage
的用法示例。
在下文中一共展示了GUIImage.Render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RenderItem
private void RenderItem(float timePassed, int iButton, bool bFocus, int dwPosX, int dwPosY, GUIListItem pItem,
bool buttonOnly)
{
if (_listButtons == null)
{
return;
}
if (iButton < 0 || iButton >= _listButtons.Count)
{
return;
}
GUIButtonControl btn = _listButtons[iButton];
if (btn == null)
{
return;
}
btn.Width = _textureWidth;
btn.Height = _textureHeight;
bool clipping = false;
if (bFocus && Focus)
{
Rectangle clipRect = new Rectangle();
clipRect.X = _positionX - _zoomXPixels / 2;
clipRect.Y = _positionY - _zoomYPixels / 2;
clipRect.Width = (_columnCount * _itemWidth) + _zoomXPixels + (_zoomXPixels / 2);
clipRect.Height = (_rowCount * _itemHeight) + _zoomYPixels + (_zoomYPixels / 2);
if (clipRect.X < 0)
{
clipRect.X = 0;
}
if (clipRect.Y < 0)
{
clipRect.Y = 0;
}
GUIGraphicsContext.BeginClip(clipRect, false);
clipping = true;
}
float fTextPosY = (float)dwPosY + (float)_textureHeight;
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;
}
if (bFocus == true && Focus && m_iSelect == GUIListControl.ListType.CONTROL_LIST)
{
if (buttonOnly)
{
btn.ColourDiffuse = 0xffffffff;
btn.Focus = true;
btn.SetPosition(dwPosX, dwPosY);
//if (true == _showTexture) btn.Render(timePassed);
if (clipping)
{
GUIGraphicsContext.EndClip();
}
return;
}
if (fTextPosY >= _positionY && _renderFocusText)
{
_listLabels[iButton].XPosition = dwPosX + _textXOff;
_listLabels[iButton].YPosition = (int)Math.Truncate(fTextPosY + _textYOff + _zoomYPixels);
_listLabels[iButton].Width = _textureWidth;
_listLabels[iButton].Height = _textureHeight;
_listLabels[iButton].TextColor = dwColor;
_listLabels[iButton].Label = pItem.Label;
_listLabels[iButton].AllowScrolling = true;
_listLabels[iButton].Render(timePassed);
//.........这里部分代码省略.........