Delphi翻译成C# 很简短 大家帮下忙
procedure TAPOS.Bitmap24Print(X, Y: Integer; Bmp: TBitmap);var YLp: Integer; XLp: Integer; b: Byte; ABmp: TBitmap; P : PByteArray; S: String; W: Integer; H: Integer;begin try ABmp := TBitmap.Create; ABmp.Width := Bmp.Width; ABmp.Height := Bmp.Height; ABmp.Assign(Bmp); ABmp.PixelFormat := pf1bit; ABmp.Monochrome := True; Sendc(ESC); Sends('I'); S := format('%4.4d', [X + FAdjustPoint]); S := Copy(S, 1, 4); Sends(S);//倃埵抲 S := format('%4.4d', [Y + FLine]); S := Copy(S, 1, 4); Sends(S);//倄埵抲 W := ABmp.Width div 8; H := ABmp.Height; S := format('%3.3d', [W]); S := Copy(S, 1, 3); Sends(S);//暆僶僀僩悢 S := format('%3.3d', [H]); S := Copy(S, 1, 3); Sends(S);//儔僀儞悢 for YLp := 0 to H - 1 do begin P := ABmp.ScanLine[YLp]; for XLp := 0 to W - 1 do begin b := not P[XLp]; Sendc(b); end; end; //ABmp.SaveToFile('MINTEST.BMP'); finally ABmp.Free; end;end;