132 references to Native
PresentationCore (132)
MS\Internal\Ink\InkSerializedFormat\AlgoModule.cs (1)
182
bitCount =
Native
.BitsPerInt;//32
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (5)
597
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
605
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
621
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
629
int count = (int)(memStream.Length - 2) /
Native
.BitsPerByte; // size of one element
647
int count = (int)((memStream.Length - 2) /
Native
.SizeOfDecimal); // size of one element
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (5)
266
Color color = Color.FromRgb((byte)(dw & 0xff), (byte)((dw & 0xff00) >>
Native
.BitsPerByte), (byte)((dw & 0xff0000) >> (
Native
.BitsPerByte * 2)));
502
uint colorVal = r + (g <<
Native
.BitsPerByte) + (b << (
Native
.BitsPerByte * 2));
667
uint cb =
Native
.SizeOfUShort; // For header NO_COMPRESS
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (19)
221
maxShort = Math.Max((ushort)shortReader.ReadUInt16Reverse(
Native
.BitsPerShort), maxShort);
222
UpdateMinMax((int)intReader.ReadUInt32Reverse(
Native
.BitsPerInt), ref maxInt, ref minInt);
232
maxShort = Math.Max((ushort)shortReader.ReadUInt16Reverse(
Native
.BitsPerShort), maxShort);
247
while ((0 != (ulAbsMax >> bitCount)) && (bitCount < (uint)
Native
.BitsPerByte))
260
while ((0 != (ulAbsMax >> shortBitCount)) && (shortBitCount < (uint)
Native
.BitsPerShort))
370
bitCount = (int)(
Native
.SizeOfInt << 3);
423
bitCount =
Native
.BitsPerInt;
428
bitCount =
Native
.BitsPerShort;
433
bitCount =
Native
.BitsPerByte;
466
return (int)reader.ReadUInt32Reverse(
Native
.BitsPerInt);
470
return (int)reader.ReadUInt16Reverse(
Native
.BitsPerShort);
474
return (int)reader.ReadByte(
Native
.BitsPerByte);
507
bitCount = (int)(
Native
.SizeOfInt << 3);
592
bitCount =
Native
.BitsPerInt;
594
bitsToWrite =
Native
.BitsPerInt;
603
bitCount =
Native
.BitsPerShort;
605
bitsToWrite =
Native
.BitsPerShort;
614
bitCount =
Native
.BitsPerByte;
616
bitsToWrite =
Native
.BitsPerByte;
MS\Internal\Ink\InkSerializedFormat\GuidTagList.cs (6)
207
uint ul = (uint)(_customGuids.Count *
Native
.SizeOfGuid);
233
stream.Write(guid.ToByteArray(), 0, (int)
Native
.SizeOfGuid);
253
uint count = size /
Native
.SizeOfGuid;
254
byte[] guids = new byte[
Native
.SizeOfGuid];
260
uint bytesRead = StrokeCollectionSerializer.ReliableRead(strm, guids,
Native
.SizeOfGuid);
263
if ( bytesRead ==
Native
.SizeOfGuid )
MS\Internal\Ink\InkSerializedFormat\InkSerializer.cs (8)
1289
cbRead = xform.Size *
Native
.SizeOfDouble;
1293
cbRead = xform.Size *
Native
.SizeOfFloat;
1528
cbEntry +=
Native
.SizeOfFloat;
2054
uint cbStrokeId = (uint)(strokes.Count *
Native
.SizeOfInt + 1 + SerializationHelper.VarSize((uint)strokes.Count)); // 1 is for the compression header
2067
cbWrote +=
Native
.SizeOfInt;
2343
cbLocal = xform.Size *
Native
.SizeOfFloat;
2415
cbData +=
Native
.SizeOfDouble;
2420
cbData +=
Native
.SizeOfFloat;
MS\Internal\Ink\InkSerializedFormat\ISFTagAndGuidCache.cs (35)
56
Native
.SizeOfInt, // X 0
57
Native
.SizeOfInt, // Y 1
58
Native
.SizeOfInt, // Z 2
59
Native
.SizeOfInt, // PACKET_STATUS 3
60
2 *
Native
.SizeOfUInt, // FILETIME : TIMER_TICK 4
61
Native
.SizeOfUInt, // SERIAL_NUMBER 5
62
Native
.SizeOfUShort, // NORMAL_PRESSURE 6
63
Native
.SizeOfUShort, // TANGENT_PRESSURE 7
64
Native
.SizeOfUShort, // BUTTON_PRESSURE 8
65
Native
.SizeOfFloat, // X_TILT_ORIENTATION 9
66
Native
.SizeOfFloat, // Y_TILT_ORIENTATION 10
67
Native
.SizeOfFloat, // AZIMUTH_ORIENTATION 11
68
Native
.SizeOfInt, // ALTITUDE_ORIENTATION 12
69
Native
.SizeOfInt, // TWIST_ORIENTATION 13
70
Native
.SizeOfUShort, // PITCH_ROTATION 14
71
Native
.SizeOfUShort, // ROLL_ROTATION 15
72
Native
.SizeOfUShort, // YAW_ROTATION 16
73
Native
.SizeOfUShort, // PEN_STYLE 17
74
Native
.SizeOfUInt, // COLORREF: COLORREF 18
75
Native
.SizeOfUInt, // PEN_WIDTH 19
76
Native
.SizeOfUInt, // PEN_HEIGHT 20
77
Native
.SizeOfByte, // PEN_TIP 21
78
Native
.SizeOfUInt, // DRAWING_FLAGS 22
79
Native
.SizeOfUInt, // CURSORID 23
82
5 *
Native
.SizeOfUInt, // INKMETRICS 26
83
3 *
Native
.SizeOfUInt, // GUIDE_STRUCTURE 27
84
8 *
Native
.SizeOfUShort, // SYSTEMTIME TIME_STAMP 28
85
Native
.SizeOfUShort, // LANGUAGE 29
86
Native
.SizeOfByte, // TRANSPARENCY 30
87
Native
.SizeOfUInt, // CURVE_FITTING_ERROR 31
89
Native
.SizeOfInt, // CURSORDOWN 33
90
Native
.SizeOfInt, // SECONDARYTIPSWITCH 34
91
Native
.SizeOfInt, // BARRELDOWN 35
92
Native
.SizeOfInt, // TABLETPICK 36
93
Native
.SizeOfInt, // ROP 37
MS\Internal\Ink\InkSerializedFormat\LZCodec.cs (5)
53
byte1 = reader.ReadByte(
Native
.BitsPerByte);
62
byte1 = reader.ReadByte(
Native
.BitsPerByte);
68
writer.Write(byte1,
Native
.BitsPerByte);
76
byte2 = reader.ReadByte(
Native
.BitsPerByte);
85
writer.Write(byte1,
Native
.BitsPerByte);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (14)
477
int fullBytesForButtonsPerPacket = buttonCount /
Native
.BitsPerByte;
480
int partialBitsForButtonsPerPacket = buttonCount %
Native
.BitsPerByte;
483
localBytesRead = (uint)((buttonCount * pointCount + 7) /
Native
.BitsPerByte);
490
int buttonSizeInBytes = (buttonCount + 7)/
Native
.BitsPerByte;
506
buttonData[byteCounter++] = bitReader.ReadByte(
Native
.BitsPerByte);
571
int nBtnDim = (buttonCount + 7) /
Native
.BitsPerByte;
574
int pointCountOfFullIntegers = (int)(nBtnDim /
Native
.SizeOfInt);
577
int pointCountOfPartialBytes = (int)(nBtnDim %
Native
.SizeOfInt);
586
iBtnByte = (int)(iInt *
Native
.SizeOfInt);
592
packets[iPacket] = ((int)((uint)((buttonData[iBtnByte] << (
Native
.BitsPerByte * 3)) | (buttonData[iBtnByte + 1] << (
Native
.BitsPerByte * 2)) | (buttonData[iBtnByte + 2] <<
Native
.BitsPerByte) | (buttonData[iBtnByte + 3]))));
601
iBtnByte = (int)(pointCountOfFullIntegers *
Native
.SizeOfInt);
613
btn = (btn <<
Native
.BitsPerByte) | (buttonData[iBtnByte + iPart]);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Ink\BitStream.cs (34)
25
_bufferLengthInBits = (uint)buffer.Length * (uint)
Native
.BitsPerByte;
42
_bufferLengthInBits = (uint)(buffer.Length - startIndex) * (uint)
Native
.BitsPerByte;
54
if (bufferLengthInBits > (buffer.Length *
Native
.BitsPerByte))
68
if (countOfBits >
Native
.BitsPerLong || countOfBits <= 0)
75
int countToRead = (int)
Native
.BitsPerByte;
97
if (countOfBits >
Native
.BitsPerShort || countOfBits <= 0)
105
int countToRead = (int)
Native
.BitsPerByte;
125
if (countOfBits >
Native
.BitsPerShort|| countOfBits <= 0)
134
int countToRead = (int)
Native
.BitsPerByte;
141
b <<= (fullBytesRead *
Native
.BitsPerByte);
155
if (countOfBits >
Native
.BitsPerInt || countOfBits <= 0)
163
int countToRead = (int)
Native
.BitsPerByte;
183
if (countOfBits >
Native
.BitsPerInt || countOfBits <= 0)
192
int countToRead = (int)
Native
.BitsPerByte;
199
b <<= (fullBytesRead *
Native
.BitsPerByte);
234
if (countOfBits >
Native
.BitsPerByte || countOfBits <= 0)
255
int rightShiftPartialByteBy =
Native
.BitsPerByte - countOfBits;
275
int rightShiftPartialByteBy =
Native
.BitsPerByte - countOfBits;
279
int rightShiftNextByteBy = Math.Abs((countOfBits - _cbitsInPartialByte) -
Native
.BitsPerByte);
289
_cbitsInPartialByte =
Native
.BitsPerByte - (countOfBits - _cbitsInPartialByte);
369
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerInt)
375
int fullBytes = countOfBits /
Native
.BitsPerByte;
379
int bitsToWrite = countOfBits %
Native
.BitsPerByte;
383
byte byteOfData = (byte)(bits >> (fullBytes *
Native
.BitsPerByte));
395
bitsToWrite =
Native
.BitsPerByte;
408
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerInt)
413
int fullBytes = countOfBits /
Native
.BitsPerByte;
417
int bitsToWrite = countOfBits %
Native
.BitsPerByte;
424
byte byteOfData = (byte)(bits >> (x *
Native
.BitsPerByte));
425
Write(byteOfData,
Native
.BitsPerByte);
437
if (countOfBits <= 0 || countOfBits >
Native
.BitsPerByte)
451
buffer |= (byte)((bits & (0xFF >> (
Native
.BitsPerByte - countOfBits))) >> (countOfBits - _remaining));
456
buffer |= (byte)((bits & (0xFF >> (
Native
.BitsPerByte - countOfBits))) << (_remaining - countOfBits));
465
_remaining =
Native
.BitsPerByte - (countOfBits - _remaining);