本文整理匯總了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;
}