本文整理汇总了C#中Rectangle.SetBounds方法的典型用法代码示例。如果您正苦于以下问题:C# Rectangle.SetBounds方法的具体用法?C# Rectangle.SetBounds怎么用?C# Rectangle.SetBounds使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Rectangle
的用法示例。
在下文中一共展示了Rectangle.SetBounds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBounds
public Rectangle GetBounds()
{
Rectangle r = new Rectangle();
r.SetBounds(0, ldr.Ascent, ldr.MaxWidth, ldr.PixHeight);
return r;
}
示例2: Initialize
/// <summary>
/// Processes the raw data into a usable form.
/// </summary>
public void Initialize()
{
bounds = new Rectangle();
bounds.SetBounds(0,0,Width,Height);
switch (Type)
{
case FntGlyphType.Version2:
case FntGlyphType.Color1:
uint RowBytes = (uint)((Width + 7) >> 3);
uint RowBits = (uint)Math.Floor((double)Width * .125) + (uint)(Width % 8);
Data = new int[Height * Width];
byte value;
for (int y = 0, im = 0; y < Height; y++)
{
for (int x = 0, xbits = 0; x < RowBytes; x++)
{
value = RawData[(y * RowBytes) + x];
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x80) >> 7);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x40) >> 6);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x20) >> 5);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x10) >> 4);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x08) >> 3);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x04) >> 2);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x02) >> 1);
xbits++;
im++;
}
else
{
break;
}
if (xbits < RowBits)
{
Data[im] = (byte)((value & 0x01) );
xbits++;
im++;
}
else
{
break;
}
//.........这里部分代码省略.........
示例3: GetBounds
public Rectangle GetBounds()
{
Rectangle r = new Rectangle();
r.SetBounds(this.CSpace, this.Ascent, this.MaxWidth, this.PixHeight);
return r;
}