132 references to Native
PresentationCore (132)
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (1)
203
bitCount =
Native
.BitsPerInt;//32
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (5)
639
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
647
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
663
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
671
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
689
int count = (int)((memStream.Length - 2) /
Native
.SizeOfDecimal); // size of one element
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (5)
287
Color color = Color.FromRgb((byte)(dw & 0xff), (byte)((dw & 0xff00) >>
Native
.BitsPerByte), (byte)((dw & 0xff0000) >> (
Native
.BitsPerByte * 2)));
534
uint colorVal = r + (g <<
Native
.BitsPerByte) + (b << (
Native
.BitsPerByte * 2));
717
uint cb =
Native
.SizeOfUShort; // For header NO_COMPRESS
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (19)
238
maxShort = Math.Max((ushort)shortReader.ReadUInt16Reverse(
Native
.BitsPerShort), maxShort);
239
UpdateMinMax((int)intReader.ReadUInt32Reverse(
Native
.BitsPerInt), ref maxInt, ref minInt);
249
maxShort = Math.Max((ushort)shortReader.ReadUInt16Reverse(
Native
.BitsPerShort), maxShort);
264
while ((0 != (ulAbsMax >> bitCount)) && (bitCount < (uint)
Native
.BitsPerByte))
277
while ((0 != (ulAbsMax >> shortBitCount)) && (shortBitCount < (uint)
Native
.BitsPerShort))
390
bitCount = (int)(
Native
.SizeOfInt << 3);
449
bitCount =
Native
.BitsPerInt;
454
bitCount =
Native
.BitsPerShort;
459
bitCount =
Native
.BitsPerByte;
492
return (int)reader.ReadUInt32Reverse(
Native
.BitsPerInt);
496
return (int)reader.ReadUInt16Reverse(
Native
.BitsPerShort);
500
return (int)reader.ReadByte(
Native
.BitsPerByte);
548
bitCount = (int)(
Native
.SizeOfInt << 3);
642
bitCount =
Native
.BitsPerInt;
644
bitsToWrite =
Native
.BitsPerInt;
653
bitCount =
Native
.BitsPerShort;
655
bitsToWrite =
Native
.BitsPerShort;
664
bitCount =
Native
.BitsPerByte;
666
bitsToWrite =
Native
.BitsPerByte;
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (6)
208
uint ul = (uint)(_CustomGuids.Count *
Native
.SizeOfGuid);
234
stream.Write(guid.ToByteArray(), 0, (int)
Native
.SizeOfGuid);
254
uint count = size /
Native
.SizeOfGuid;
255
byte[] guids = new byte[
Native
.SizeOfGuid];
262
uint bytesRead = StrokeCollectionSerializer.ReliableRead(strm, guids,
Native
.SizeOfGuid);
265
if ( bytesRead ==
Native
.SizeOfGuid )
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (8)
1318
cbRead = xform.Size *
Native
.SizeOfDouble;
1322
cbRead = xform.Size *
Native
.SizeOfFloat;
1559
cbEntry +=
Native
.SizeOfFloat;
2120
uint cbStrokeId = (uint)(strokes.Count *
Native
.SizeOfInt + 1 + SerializationHelper.VarSize((uint)strokes.Count)); // 1 is for the compression header
2139
cbWrote +=
Native
.SizeOfInt;
2418
cbLocal = xform.Size *
Native
.SizeOfFloat;
2495
cbData +=
Native
.SizeOfDouble;
2500
cbData +=
Native
.SizeOfFloat;
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\ISFTagAndGuidCache.cs (35)
58
Native
.SizeOfInt, // X 0
59
Native
.SizeOfInt, // Y 1
60
Native
.SizeOfInt, // Z 2
61
Native
.SizeOfInt, // PACKET_STATUS 3
62
2 *
Native
.SizeOfUInt, // FILETIME : TIMER_TICK 4
63
Native
.SizeOfUInt, // SERIAL_NUMBER 5
64
Native
.SizeOfUShort, // NORMAL_PRESSURE 6
65
Native
.SizeOfUShort, // TANGENT_PRESSURE 7
66
Native
.SizeOfUShort, // BUTTON_PRESSURE 8
67
Native
.SizeOfFloat, // X_TILT_ORIENTATION 9
68
Native
.SizeOfFloat, // Y_TILT_ORIENTATION 10
69
Native
.SizeOfFloat, // AZIMUTH_ORIENTATION 11
70
Native
.SizeOfInt, // ALTITUDE_ORIENTATION 12
71
Native
.SizeOfInt, // TWIST_ORIENTATION 13
72
Native
.SizeOfUShort, // PITCH_ROTATION 14
73
Native
.SizeOfUShort, // ROLL_ROTATION 15
74
Native
.SizeOfUShort, // YAW_ROTATION 16
75
Native
.SizeOfUShort, // PEN_STYLE 17
76
Native
.SizeOfUInt, // COLORREF: COLORREF 18
77
Native
.SizeOfUInt, // PEN_WIDTH 19
78
Native
.SizeOfUInt, // PEN_HEIGHT 20
79
Native
.SizeOfByte, // PEN_TIP 21
80
Native
.SizeOfUInt, // DRAWING_FLAGS 22
81
Native
.SizeOfUInt, // CURSORID 23
84
5 *
Native
.SizeOfUInt, // INKMETRICS 26
85
3 *
Native
.SizeOfUInt, // GUIDE_STRUCTURE 27
86
8 *
Native
.SizeOfUShort, // SYSTEMTIME TIME_STAMP 28
87
Native
.SizeOfUShort, // LANGUAGE 29
88
Native
.SizeOfByte, // TRANSPARENCY 30
89
Native
.SizeOfUInt, // CURVE_FITTING_ERROR 31
91
Native
.SizeOfInt, // CURSORDOWN 33
92
Native
.SizeOfInt, // SECONDARYTIPSWITCH 34
93
Native
.SizeOfInt, // BARRELDOWN 35
94
Native
.SizeOfInt, // TABLETPICK 36
95
Native
.SizeOfInt, // ROP 37
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\LZCodec.cs (5)
67
byte1 = reader.ReadByte(
Native
.BitsPerByte);
76
byte1 = reader.ReadByte(
Native
.BitsPerByte);
82
writer.Write(byte1,
Native
.BitsPerByte);
90
byte2 = reader.ReadByte(
Native
.BitsPerByte);
99
writer.Write(byte1,
Native
.BitsPerByte);
Core\CSharp\MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (14)
513
int fullBytesForButtonsPerPacket = buttonCount /
Native
.BitsPerByte;
516
int partialBitsForButtonsPerPacket = buttonCount %
Native
.BitsPerByte;
519
localBytesRead = (uint)((buttonCount * pointCount + 7) /
Native
.BitsPerByte);
526
int buttonSizeInBytes = (buttonCount + 7)/
Native
.BitsPerByte;
542
buttonData[byteCounter++] = bitReader.ReadByte(
Native
.BitsPerByte);
607
int nBtnDim = (buttonCount + 7) /
Native
.BitsPerByte;
610
int pointCountOfFullIntegers = (int)(nBtnDim /
Native
.SizeOfInt);
613
int pointCountOfPartialBytes = (int)(nBtnDim %
Native
.SizeOfInt);
622
iBtnByte = (int)(iInt *
Native
.SizeOfInt);
628
packets[iPacket] = ((int)((uint)((buttonData[iBtnByte] << (
Native
.BitsPerByte * 3)) | (buttonData[iBtnByte + 1] << (
Native
.BitsPerByte * 2)) | (buttonData[iBtnByte + 2] <<
Native
.BitsPerByte) | (buttonData[iBtnByte + 3]))));
637
iBtnByte = (int)(pointCountOfFullIntegers *
Native
.SizeOfInt);
649
btn = (btn <<
Native
.BitsPerByte) | (buttonData[iBtnByte + iPart]);
Shared\MS\Internal\Ink\BitStream.cs (34)
33
_bufferLengthInBits = (uint)buffer.Length * (uint)
Native
.BitsPerByte;
51
_bufferLengthInBits = (uint)(buffer.Length - startIndex) * (uint)
Native
.BitsPerByte;
63
if (bufferLengthInBits > (buffer.Length *
Native
.BitsPerByte))
77
if (countOfBits >
Native
.BitsPerLong || countOfBits <= 0)
84
int countToRead = (int)
Native
.BitsPerByte;
106
if (countOfBits >
Native
.BitsPerShort || countOfBits <= 0)
114
int countToRead = (int)
Native
.BitsPerByte;
134
if (countOfBits >
Native
.BitsPerShort|| countOfBits <= 0)
143
int countToRead = (int)
Native
.BitsPerByte;
150
b <<= (fullBytesRead *
Native
.BitsPerByte);
164
if (countOfBits >
Native
.BitsPerInt || countOfBits <= 0)
172
int countToRead = (int)
Native
.BitsPerByte;
192
if (countOfBits >
Native
.BitsPerInt || countOfBits <= 0)
201
int countToRead = (int)
Native
.BitsPerByte;
208
b <<= (fullBytesRead *
Native
.BitsPerByte);
243
if (countOfBits >
Native
.BitsPerByte || countOfBits <= 0)
264
int rightShiftPartialByteBy =
Native
.BitsPerByte - countOfBits;
284
int rightShiftPartialByteBy =
Native
.BitsPerByte - countOfBits;
288
int rightShiftNextByteBy = Math.Abs((countOfBits - _cbitsInPartialByte) -
Native
.BitsPerByte);
298
_cbitsInPartialByte =
Native
.BitsPerByte - (countOfBits - _cbitsInPartialByte);
381
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerInt)
387
int fullBytes = countOfBits /
Native
.BitsPerByte;
391
int bitsToWrite = countOfBits %
Native
.BitsPerByte;
395
byte byteOfData = (byte)(bits >> (fullBytes *
Native
.BitsPerByte));
407
bitsToWrite =
Native
.BitsPerByte;
420
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerInt)
425
int fullBytes = countOfBits /
Native
.BitsPerByte;
429
int bitsToWrite = countOfBits %
Native
.BitsPerByte;
436
byte byteOfData = (byte)(bits >> (x *
Native
.BitsPerByte));
437
Write(byteOfData,
Native
.BitsPerByte);
449
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerByte)
463
buffer |= (byte)((bits & (0xFF >> (
Native
.BitsPerByte - countOfBits))) >> (countOfBits - _remaining));
468
buffer |= (byte)((bits & (0xFF >> (
Native
.BitsPerByte - countOfBits))) << (_remaining - countOfBits));
477
_remaining =
Native
.BitsPerByte - (countOfBits - _remaining);