55 references to BitsPerByte
PresentationCore (55)
MS\Internal\Ink\InkSerializedFormat\CustomAttributeSerializer.cs (4)
597int count = (int)(memStream.Length - 2) / Native.BitsPerByte; // size of one element 605int count = (int)(memStream.Length - 2) / Native.BitsPerByte; // size of one element 621int count = (int)(memStream.Length - 2) / Native.BitsPerByte; // size of one element 629int count = (int)(memStream.Length - 2) / Native.BitsPerByte; // size of one element
MS\Internal\Ink\InkSerializedFormat\DrawingAttributeSerializer.cs (4)
266Color color = Color.FromRgb((byte)(dw & 0xff), (byte)((dw & 0xff00) >> Native.BitsPerByte), (byte)((dw & 0xff0000) >> (Native.BitsPerByte * 2))); 502uint colorVal = r + (g << Native.BitsPerByte) + (b << (Native.BitsPerByte * 2));
MS\Internal\Ink\InkSerializedFormat\GorillaCodec.cs (5)
247while ((0 != (ulAbsMax >> bitCount)) && (bitCount < (uint)Native.BitsPerByte)) 433bitCount = Native.BitsPerByte; 474return (int)reader.ReadByte(Native.BitsPerByte); 614bitCount = Native.BitsPerByte; 616bitsToWrite = Native.BitsPerByte;
MS\Internal\Ink\InkSerializedFormat\LZCodec.cs (5)
53byte1 = reader.ReadByte(Native.BitsPerByte); 62byte1 = reader.ReadByte(Native.BitsPerByte); 68writer.Write(byte1, Native.BitsPerByte); 76byte2 = reader.ReadByte(Native.BitsPerByte); 85writer.Write(byte1, Native.BitsPerByte);
MS\Internal\Ink\InkSerializedFormat\StrokeSerializer.cs (10)
477int fullBytesForButtonsPerPacket = buttonCount / Native.BitsPerByte; 480int partialBitsForButtonsPerPacket = buttonCount % Native.BitsPerByte; 483localBytesRead = (uint)((buttonCount * pointCount + 7) / Native.BitsPerByte); 490int buttonSizeInBytes = (buttonCount + 7)/Native.BitsPerByte; 506buttonData[byteCounter++] = bitReader.ReadByte(Native.BitsPerByte); 571int nBtnDim = (buttonCount + 7) / Native.BitsPerByte; 592packets[iPacket] = ((int)((uint)((buttonData[iBtnByte] << (Native.BitsPerByte * 3)) | (buttonData[iBtnByte + 1] << (Native.BitsPerByte * 2)) | (buttonData[iBtnByte + 2] << Native.BitsPerByte) | (buttonData[iBtnByte + 3])))); 613btn = (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; 54if (bufferLengthInBits > (buffer.Length * Native.BitsPerByte)) 75int countToRead = (int)Native.BitsPerByte; 105int countToRead = (int)Native.BitsPerByte; 134int countToRead = (int)Native.BitsPerByte; 141b <<= (fullBytesRead * Native.BitsPerByte); 163int countToRead = (int)Native.BitsPerByte; 192int countToRead = (int)Native.BitsPerByte; 199b <<= (fullBytesRead * Native.BitsPerByte); 234if (countOfBits > Native.BitsPerByte || countOfBits <= 0) 255int rightShiftPartialByteBy = Native.BitsPerByte - countOfBits; 275int rightShiftPartialByteBy = Native.BitsPerByte - countOfBits; 279int rightShiftNextByteBy = Math.Abs((countOfBits - _cbitsInPartialByte) - Native.BitsPerByte); 289_cbitsInPartialByte = Native.BitsPerByte - (countOfBits - _cbitsInPartialByte); 375int fullBytes = countOfBits / Native.BitsPerByte; 379int bitsToWrite = countOfBits % Native.BitsPerByte; 383byte byteOfData = (byte)(bits >> (fullBytes * Native.BitsPerByte)); 395bitsToWrite = Native.BitsPerByte; 413int fullBytes = countOfBits / Native.BitsPerByte; 417int bitsToWrite = countOfBits % Native.BitsPerByte; 424byte byteOfData = (byte)(bits >> (x * Native.BitsPerByte)); 425Write(byteOfData, Native.BitsPerByte); 437if (countOfBits <= 0 || countOfBits > Native.BitsPerByte) 451buffer |= (byte)((bits & (0xFF >> (Native.BitsPerByte - countOfBits))) >> (countOfBits - _remaining)); 456buffer |= (byte)((bits & (0xFF >> (Native.BitsPerByte - countOfBits))) << (_remaining - countOfBits)); 465_remaining = Native.BitsPerByte - (countOfBits - _remaining);