本文整理汇总了C#中PictureBox.BlitToBuffer方法的典型用法代码示例。如果您正苦于以下问题:C# PictureBox.BlitToBuffer方法的具体用法?C# PictureBox.BlitToBuffer怎么用?C# PictureBox.BlitToBuffer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PictureBox
的用法示例。
在下文中一共展示了PictureBox.BlitToBuffer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InitMapEditorWidgets
//.........这里部分代码省略.........
lblMode.Font = Graphics.FontManager.LoadFont("PMU", 18);
lblMode.Location = new Point();
lblMode.Visible = false;
txt1 = new TextBox("txt1");
txt1.Size = new Size(134, 18);
txt1.Visible = false;
txt2 = new TextBox("txt2");
txt2.Size = new Size(134, 18);
txt2.Visible = false;
txt3 = new TextBox("txt3");
txt3.Size = new Size(134, 18);
txt3.Visible = false;
hsb1 = new HScrollBar("hsb1");
hsb1.Size = new Size(134, 20);
hsb1.Visible = false;
hsb1.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb1_ValueChanged);
hsb2 = new HScrollBar("hsb2");
hsb2.Size = new Size(134, 20);
hsb2.Visible = false;
hsb2.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb2_ValueChanged);
hsb3 = new HScrollBar("hsb3");
hsb3.Size = new Size(134, 20);
hsb3.Visible = false;
hsb3.ValueChanged += new EventHandler<ValueChangedEventArgs>(hsb3_ValueChanged);
picSprite = new PictureBox("picSprite");
picSprite.Size = new Size(32, 64);
picSprite.BlitToBuffer(Graphics.GraphicsManager.GetSpriteSheet(hsb1.Value).GetSheet(Graphics.FrameType.Idle, Enums.Direction.Down), new Rectangle(96, 0, 32, 64));
picSprite.Location = new Point(140, 35);
picSprite.BackColor = Color.White;
picSprite.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
picSprite.Visible = false;
picSprite2 = new PictureBox("picSprite2");
picSprite2.Size = new Size(32, 64);
picSprite2.BlitToBuffer(Graphics.GraphicsManager.GetSpriteSheet(hsb2.Value).GetSheet(Graphics.FrameType.Idle, Enums.Direction.Down), new Rectangle(96, 0, 32, 64));
picSprite2.Location = new Point(75, 130);
picSprite2.BackColor = Color.White;
picSprite2.BorderStyle = SdlDotNet.Widgets.BorderStyle.FixedSingle;
picSprite2.Visible = false;
lstSound = new ListBox("lstSound");
lstSound.Location = new Point(10, 60);
lstSound.Size = new Size(180, 140);
{
SdlDotNet.Graphics.Font font = Logic.Graphics.FontManager.LoadFont("PMU", 18);
string[] sfxFiles = System.IO.Directory.GetFiles(IO.Paths.SfxPath);
for (int i = 0; i < sfxFiles.Length; i++) {
lstSound.Items.Add(new ListBoxTextItem(font, System.IO.Path.GetFileName(sfxFiles[i])));
}
}
lstSound.Visible = false;
chkTake = new CheckBox("chkTake");
chkTake.BackColor = Color.Transparent;
chkTake.Size = new System.Drawing.Size(125, 17);
chkTake.Font = Logic.Graphics.FontManager.LoadFont("tahoma", 8);
chkTake.Text = "Take away key upon use";