798
pSetPixel8_ROP2 SetPixel8_ROP2_[16] =
798
#define PIXEL_TYPE uint8
799
#define GDI_GET_POINTER gdi_GetPointer_8bpp
800
#define GDI_GET_PEN_COLOR gdi_GetPenColor_8bpp
802
#define LINE_TO LineTo_BLACK_8bpp
803
#define SET_PIXEL_ROP2 SetPixel_BLACK_8bpp
804
#include "include/line.c"
806
#undef SET_PIXEL_ROP2
808
#define LINE_TO LineTo_NOTMERGEPEN_8bpp
809
#define SET_PIXEL_ROP2 SetPixel_NOTMERGEPEN_8bpp
810
#include "include/line.c"
812
#undef SET_PIXEL_ROP2
814
#define LINE_TO LineTo_MASKNOTPEN_8bpp
815
#define SET_PIXEL_ROP2 SetPixel_MASKNOTPEN_8bpp
816
#include "include/line.c"
818
#undef SET_PIXEL_ROP2
820
#define LINE_TO LineTo_NOTCOPYPEN_8bpp
821
#define SET_PIXEL_ROP2 SetPixel_NOTCOPYPEN_8bpp
822
#include "include/line.c"
824
#undef SET_PIXEL_ROP2
826
#define LINE_TO LineTo_MASKPENNOT_8bpp
827
#define SET_PIXEL_ROP2 SetPixel_MASKPENNOT_8bpp
828
#include "include/line.c"
830
#undef SET_PIXEL_ROP2
832
#define LINE_TO LineTo_NOT_8bpp
833
#define SET_PIXEL_ROP2 SetPixel_NOT_8bpp
834
#include "include/line.c"
836
#undef SET_PIXEL_ROP2
838
#define LINE_TO LineTo_XORPEN_8bpp
839
#define SET_PIXEL_ROP2 SetPixel_XORPEN_8bpp
840
#include "include/line.c"
842
#undef SET_PIXEL_ROP2
844
#define LINE_TO LineTo_NOTMASKPEN_8bpp
845
#define SET_PIXEL_ROP2 SetPixel_NOTMASKPEN_8bpp
846
#include "include/line.c"
848
#undef SET_PIXEL_ROP2
850
#define LINE_TO LineTo_MASKPEN_8bpp
851
#define SET_PIXEL_ROP2 SetPixel_MASKPEN_8bpp
852
#include "include/line.c"
854
#undef SET_PIXEL_ROP2
856
#define LINE_TO LineTo_NOTXORPEN_8bpp
857
#define SET_PIXEL_ROP2 SetPixel_NOTXORPEN_8bpp
858
#include "include/line.c"
860
#undef SET_PIXEL_ROP2
862
#define LINE_TO LineTo_NOP_8bpp
863
#define SET_PIXEL_ROP2 SetPixel_NOP_8bpp
864
#include "include/line.c"
866
#undef SET_PIXEL_ROP2
868
#define LINE_TO LineTo_MERGENOTPEN_8bpp
869
#define SET_PIXEL_ROP2 SetPixel_MERGENOTPEN_8bpp
870
#include "include/line.c"
872
#undef SET_PIXEL_ROP2
874
#define LINE_TO LineTo_COPYPEN_8bpp
875
#define SET_PIXEL_ROP2 SetPixel_COPYPEN_8bpp
876
#include "include/line.c"
878
#undef SET_PIXEL_ROP2
880
#define LINE_TO LineTo_MERGEPENNOT_8bpp
881
#define SET_PIXEL_ROP2 SetPixel_MERGEPENNOT_8bpp
882
#include "include/line.c"
884
#undef SET_PIXEL_ROP2
886
#define LINE_TO LineTo_MERGEPEN_8bpp
887
#define SET_PIXEL_ROP2 SetPixel_MERGEPEN_8bpp
888
#include "include/line.c"
890
#undef SET_PIXEL_ROP2
892
#define LINE_TO LineTo_WHITE_8bpp
893
#define SET_PIXEL_ROP2 SetPixel_WHITE_8bpp
894
#include "include/line.c"
896
#undef SET_PIXEL_ROP2
899
#undef GDI_GET_POINTER
900
#undef GDI_GET_PEN_COLOR
902
pLineTo_8bpp LineTo_ROP2_8bpp[32] =
801
SetPixel_NOTMERGEPEN_8bpp,
802
SetPixel_MASKNOTPEN_8bpp,
803
SetPixel_NOTCOPYPEN_8bpp,
804
SetPixel_MASKPENNOT_8bpp,
806
SetPixel_XORPEN_8bpp,
807
SetPixel_NOTMASKPEN_8bpp,
808
SetPixel_MASKPEN_8bpp,
809
SetPixel_NOTXORPEN_8bpp,
811
SetPixel_MERGENOTPEN_8bpp,
812
SetPixel_COPYPEN_8bpp,
813
SetPixel_MERGEPENNOT_8bpp,
814
SetPixel_MERGEPEN_8bpp,
905
LineTo_NOTMERGEPEN_8bpp,
906
LineTo_MASKNOTPEN_8bpp,
907
LineTo_NOTCOPYPEN_8bpp,
908
LineTo_MASKPENNOT_8bpp,
911
LineTo_NOTMASKPEN_8bpp,
913
LineTo_NOTXORPEN_8bpp,
915
LineTo_MERGENOTPEN_8bpp,
917
LineTo_MERGEPENNOT_8bpp,
918
LineTo_MERGEPEN_8bpp,
818
922
int LineTo_8bpp(HGDI_DC hdc, int nXEnd, int nYEnd)
839
dx = (x1 > x2) ? x1 - x2 : x2 - x1;
840
dy = (y1 > y2) ? y1 - y2 : y2 - y1;
842
sx = (x1 < x2) ? 1 : -1;
843
sy = (y1 < y2) ? 1 : -1;
850
irop2 = gdi_GetROP2(hdc) - 1;
851
bmp = (HGDI_BITMAP) hdc->selectedObject;
855
bx1 = (x1 < x2) ? x1 : x2;
856
by1 = (y1 < y2) ? y1 : y2;
857
bx2 = (x1 > x2) ? x1 : x2;
858
by2 = (y1 > y2) ? y1 : y2;
924
pLineTo_8bpp _LineTo;
925
int rop2 = gdi_GetROP2(hdc) - 1;
927
_LineTo = LineTo_ROP2_8bpp[rop2];
930
return _LineTo(hdc, nXEnd, nYEnd);
864
bx2 = bx1 + hdc->clip->w - 1;
865
by2 = by1 + hdc->clip->h - 1;
868
pen = gdi_GetPenColor_8bpp(hdc->pen);
872
if (!(x == x2 && y == y2))
874
if ((x >= bx1 && x <= bx2) && (y >= by1 && y <= by2))
876
pixel = gdi_GetPointer_8bpp(bmp, x, y);
877
SetPixel8_ROP2_[irop2](pixel, &pen);