📄 m1b_lin.c
字号:
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstPtr++;
pxBit = 0x80;
}
}
return;
}
/* Vertical top->bottom replace. */
void M1BURV()
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
rowTablePtr[0]++;
}
return;
}
/* Diagonal top->bottom, right->left replace. */
void M1BURDRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
rowTablePtr[0]++;
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
}
return;
}
/* Diagonal top->bottom, left->right replace. */
void M1BURDLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
rowTablePtr[0]++;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
}
return;
}
/* Y major top->bottom, left->right replace. */
void M1BURYMLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
rowTablePtr[0]++;
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
}
}
return;
}
/* Y major top->bottom, right->left replace. */
void M1BURYMRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
rowTablePtr[0]++;
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
}
}
return;
}
/* X major top->bottom, left->right replace. */
void M1BURXMLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
rowTablePtr[0]++;
}
}
return;
}
/* X major top->bottom, right->left replace. */
void M1BURXMRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
if(lclPenColor)
{
*dstPtr |= pxBit;
}
else
{
*dstPtr = *dstPtr & ~pxBit;
}
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
rowTablePtr[0]++;
}
}
return;
}
/* Horizontal left->right XOR. */
void M1BUXH(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstPtr = (byte *) *rowTablePtr[0] + (dRect.Xmin >> 3);
for (i = 0; i <= majorAxisLengthM1; i++)
{
*dstPtr ^= pxBit;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstPtr++;
pxBit = 0x80;
}
}
return;
}
/* Vertical top->bottom XOR. */
void M1BUXV()
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
rowTablePtr[0]++;
}
return;
}
/* Diagonal top->bottom, right->left XOR. */
void M1BUXDRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
rowTablePtr[0]++;
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
}
return;
}
/* Diagonal top->bottom, left->right XOR. */
void M1BUXDLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
rowTablePtr[0]++;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
}
return;
}
/* Y major top->bottom, left->right XOR. */
void M1BUXYMLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
rowTablePtr[0]++;
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
}
}
return;
}
/* Y major top->bottom, right->left XOR. */
void M1BUXYMRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
rowTablePtr[0]++;
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
}
}
return;
}
/* X major top->bottom, left->right XOR. */
void M1BUXXMLR(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
pxBit = (pxBit >> 1);
if(pxBit == 0)
{
dstBgnByte++;
pxBit = 0x80;
}
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
rowTablePtr[0]++;
}
}
return;
}
/* X major top->bottom, right->left XOR. */
void M1BUXXMRL(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr ^ pxBit;
pxBit = (pxBit << 1);
if(pxBit == 0)
{
dstBgnByte--;
pxBit = 0x01;
}
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
rowTablePtr[0]++;
}
}
return;
}
/* Y major top->bottom, left->right masked, OR. */
/* #define M1BMOYMLR M1BMOV */
/* Y major top->bottom, vertical masked, OR. */
void M1BMOV(void)
{
int i;
byte pxBit;
pxBit = (byte) (0x80 >> (dRect.Xmin & 0x07));
dstBgnByte = dRect.Xmin >> 3;
for (i = 0; i <= majorAxisLengthM1; i++)
{
dstPtr = (byte *) *rowTablePtr[0] + dstBgnByte;
*dstPtr = *dstPtr | pxBit;
rowTablePtr[0]++;
errTermL += errTermAdjUpL;
if (errTermL >= 0)
{ /* minor axis advance */
errTermL -= errTermAdjDownL;
pxBit = (pxBit >> 1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -