public EMFColor(DataArrayReader reader) { int argb = 0; if (reader != null) reader.Read(ref argb); argb = ((argb & 0xff) << 16) | (argb & 0xff00) | ((argb & 0xff0000) >> 16); // r and b are reversed ColorRef = Color.FromArgb(argb); }
internal EMFPen(DataArrayReader reader) { reader.Read(ref HandleIndex); reader.Read(ref offBmi); reader.Read(ref cbBmi); reader.Read(ref offBits); reader.Read(ref cbBits); reader.Read(ref elpPenStyle); reader.Read(ref elpWidth); reader.Read(ref elpBrushStyle); int argb = 0; reader.Read(ref argb); elpColor = Color.FromArgb(argb); int hatch = 0; reader.Read(ref hatch); elpHatch = new IntPtr(hatch); reader.Read(ref elpNumEntries); elpStyleEntry = new uint[elpNumEntries]; for (int i=0; i<elpNumEntries; i++) { reader.Read(ref elpStyleEntry[i]); } }
internal EMFBitBlt(DataArrayReader reader) { reader.Read(ref Bounds); reader.Read(ref xDest); reader.Read(ref yDest); reader.Read(ref cxDest); reader.Read(ref cyDest); reader.Read(ref dwRop); reader.Read(ref xSrc); reader.Read(ref ySrc); xformSrc = new uint[6]; for (int i = 0; i < 6; i++) reader.Read(ref xformSrc[i]); int argb = 0; reader.Read(ref argb); crBkColorSrc = Color.FromArgb(argb); reader.Read(ref iUsageSrc); reader.Read(ref offBmiSrc); reader.Read(ref cbBmiSrc); reader.Read(ref offBitsSrc); reader.Read(ref cbBitsSrc); }
internal EMFTextRecord(DataArrayReader reader) { reader.Read(ref Bounds); reader.Read(ref GraphicsMode); reader.Read(ref XScale); reader.Read(ref YScale); reader.Read(ref Reference); reader.Read(ref NChars); reader.Read(ref OffString); reader.Read(ref Options); reader.Read(ref ClippingRect); reader.Read(ref OffSpacing); reader.SetPosition(OffString - 8); Text = reader.ReadUnicodeString(NChars); Spacing = new int[NChars]; reader.SetPosition(OffSpacing - 8); for (int i = 0; i < NChars; i++) reader.Read(ref Spacing[i]); }
public EMFSelectedObject(DataArrayReader reader) { reader.Read(ref HandleIndex); }
internal EMFFont(DataArrayReader reader) { reader.Read(ref HandleIndex); reader.Read(ref Height); reader.Read(ref Width); reader.Read(ref Escapement); reader.Read(ref Orientation); reader.Read(ref Weight); reader.Read(ref Italic); reader.Read(ref Underline); reader.Read(ref StrikeOut); reader.Read(ref CharSet); reader.Read(ref OutPrecision); reader.Read(ref ClipPrecision); reader.Read(ref Quality); reader.Read(ref PitchAndFamily); FaceName = reader.ReadUnicodeString(32); elfFullName = reader.ReadUnicodeString(64); elfStyle = reader.ReadUnicodeString(32); reader.Read(ref elfVersion); /* 0 for the first release of NT */ reader.Read(ref elfStyleSize); reader.Read(ref elfMatch); reader.Read(ref elfReserved); elfVendorId = new byte[4]; for (int i=0; i<4; i++) reader.Read(ref elfVendorId[i]); reader.Read(ref elfCulture); /* 0 for Latin */ // PANOSE elfPanose; reader.Read(ref bFamilyType); reader.Read(ref bSerifStyle); reader.Read(ref bWeight); reader.Read(ref bProportion); reader.Read(ref bContrast); reader.Read(ref bStrokeVariation); reader.Read(ref bArmStyle); reader.Read(ref bLetterform); reader.Read(ref bMidline); reader.Read(ref bXHeight); }
public EMFHeader(DataArrayReader reader) { reader.Read(ref rclBounds); reader.Read(ref rclFrame); reader.Read(ref dSignature); reader.Read(ref nVersion); reader.Read(ref nBytes); reader.Read(ref nRecords); reader.Read(ref nHandles); reader.Read(ref sReserved); reader.Read(ref nDescription); reader.Read(ref offDescription); reader.Read(ref nPalEntries); reader.Read(ref szlDevice); reader.Read(ref szlMillimeters); // #if (WINVER >= 0x0400) reader.Read(ref cbPixelFormat); reader.Read(ref offPixelFormat); reader.Read(ref bOpenGL); // #endif /* WINVER >= 0x0400 */ // #if (WINVER >= 0x0500) reader.Read(ref szlMicrometers); // #endif /* WINVER >= 0x0500 */ }
private Point DecodePoint(int flags, byte[] dataArray) { DataArrayReader reader = new DataArrayReader(dataArray); int x = 0; int y = 0; reader.Read(ref x); reader.Read(ref y); return new Point(x, y); }
private int DecodeInt(byte[] dataArray) { int result = 0; DataArrayReader reader = new DataArrayReader(dataArray); reader.Read(ref result); return result; }
private Rectangle DecodeRect(byte[] dataArray) { DataArrayReader reader = new DataArrayReader(dataArray); Rectangle result = new Rectangle(); reader.Read(ref result); return result; }