55 references to BitsPerByte
PresentationCore (55)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (4)
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
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (4)
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));
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (5)
247
while ((0 != (ulAbsMax >> bitCount)) && (bitCount < (uint)Native.
BitsPerByte
))
433
bitCount = Native.
BitsPerByte
;
474
return (int)reader.ReadByte(Native.
BitsPerByte
);
614
bitCount = Native.
BitsPerByte
;
616
bitsToWrite = Native.
BitsPerByte
;
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 (10)
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
;
592
packets[iPacket] = ((int)((uint)((buttonData[iBtnByte] << (Native.
BitsPerByte
* 3)) | (buttonData[iBtnByte + 1] << (Native.
BitsPerByte
* 2)) | (buttonData[iBtnByte + 2] << Native.
BitsPerByte
) | (buttonData[iBtnByte + 3]))));
613
btn = (btn << Native.
BitsPerByte
) | (buttonData[iBtnByte + iPart]);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\Ink\BitStream.cs (27)
25
_bufferLengthInBits = (uint)buffer.Length * (uint)Native.
BitsPerByte
;
42
_bufferLengthInBits = (uint)(buffer.Length - startIndex) * (uint)Native.
BitsPerByte
;
54
if (bufferLengthInBits > (buffer.Length * Native.
BitsPerByte
))
75
int countToRead = (int)Native.
BitsPerByte
;
105
int countToRead = (int)Native.
BitsPerByte
;
134
int countToRead = (int)Native.
BitsPerByte
;
141
b <<= (fullBytesRead * Native.
BitsPerByte
);
163
int countToRead = (int)Native.
BitsPerByte
;
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);
375
int fullBytes = countOfBits / Native.
BitsPerByte
;
379
int bitsToWrite = countOfBits % Native.
BitsPerByte
;
383
byte byteOfData = (byte)(bits >> (fullBytes * Native.
BitsPerByte
));
395
bitsToWrite = Native.
BitsPerByte
;
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);