本文整理汇总了C#中OTFontFile.MBOBuffer.SetInt方法的典型用法代码示例。如果您正苦于以下问题:C# MBOBuffer.SetInt方法的具体用法?C# MBOBuffer.SetInt怎么用?C# MBOBuffer.SetInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OTFontFile.MBOBuffer
的用法示例。
在下文中一共展示了MBOBuffer.SetInt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GenerateTable
public override OTTable GenerateTable()
{
// create a Motorola Byte Order buffer for the new table
MBOBuffer newbuf = new MBOBuffer( 8 + (uint)(SizeofDeviceRecord * m_NumberDeviceRecords));
// populate the buffer
newbuf.SetUshort( m_TableVersionNumber, (uint)Table_hdmx.FieldOffsets.TableVersionNumber );
newbuf.SetShort( m_NumberDeviceRecords, (uint)Table_hdmx.FieldOffsets.NumberDeviceRecords );
newbuf.SetInt( SizeofDeviceRecord, (uint)Table_hdmx.FieldOffsets.SizeofDeviceRecord );
for( short i = 0; i < m_NumberDeviceRecords; i++ )
{
newbuf.SetByte(((DeviceRecordCache)m_DeviceRecords[i]).PixelSize, (uint)Table_hdmx.FieldOffsets.DeviceRecord + (uint)(i * SizeofDeviceRecord ) + (uint)DeviceRecord.FieldOffsets.PixelSize );
newbuf.SetByte(((DeviceRecordCache)m_DeviceRecords[i]).MaxWidth, (uint)Table_hdmx.FieldOffsets.DeviceRecord + (uint)(i * SizeofDeviceRecord ) + (uint)DeviceRecord.FieldOffsets.MaxWidth );
for( ushort ii = 0; ii < m_NumGlyphs; ii++ )
{
newbuf.SetByte(((DeviceRecordCache)m_DeviceRecords[i]).getWidth( ii ), (uint)Table_hdmx.FieldOffsets.DeviceRecord + (uint)(i * SizeofDeviceRecord ) + (uint)(DeviceRecord.FieldOffsets.Widths + ii ));
}
// Pad the end with zeros
for( uint ii = 0; ii < getNumPadBytes(); ii++ )
{
newbuf.SetByte( 0, (uint)Table_hdmx.FieldOffsets.DeviceRecord + (uint)(i * SizeofDeviceRecord ) + (uint)DeviceRecord.FieldOffsets.Widths + m_NumGlyphs + ii );
}
}
// put the buffer into a Table_hdmx object and return it
Table_hdmx hdmxTable = new Table_hdmx("hdmx", newbuf);
return hdmxTable;
}