本文整理汇总了C#中IDisplay.GetDisplayDefinition方法的典型用法代码示例。如果您正苦于以下问题:C# IDisplay.GetDisplayDefinition方法的具体用法?C# IDisplay.GetDisplayDefinition怎么用?C# IDisplay.GetDisplayDefinition使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDisplay
的用法示例。
在下文中一共展示了IDisplay.GetDisplayDefinition方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DisplayTimingViewModel
public DisplayTimingViewModel(IGameBoy gameboy, IDisplay display, IDispatcher dispatcher)
{
_gameBoy = gameboy;
_display = display;
//_gameBoy.FrameCompleted += OnFrameCompleted;
_dispatcher = dispatcher;
var disDef = _display.GetDisplayDefinition();
_displayTiming = new WriteableBitmap(disDef.TimingPixelCountX, disDef.TimingPixelCountY,
96, 96, PixelFormats.Bgra32, null);
}
示例2: GameBoyGamePadViewModel
public GameBoyGamePadViewModel(IGameBoy gameBoy, IDispatcher dispatcher)
{
_dispatcher = dispatcher;
_gameBoy = gameBoy;
_display = _gameBoy.Display;
_gameBoy.FrameCompleted += OnFrameCompleted;
VideoSpace.DisplayDefinition disDef = _display.GetDisplayDefinition();
_screen = new WriteableBitmap(disDef.ScreenPixelCountX, disDef.ScreenPixelCountY,
96, 96,
System.Windows.Media.PixelFormats.Bgra32, null);
_frame = new uint[disDef.ScreenPixelCountX * disDef.ScreenPixelCountY];
}