Article View: fj.lang.tcl
Article #444Re: trouble of stipple
From: Toshihiko Haga
Date: Wed, 27 Nov 1996 00:00
Date: Wed, 27 Nov 1996 00:00
117 lines
3994 bytes
3994 bytes
In article <HAGA.96Nov13114153@srashc.sra.CO.JP> haga@sra.CO.JP (Toshihiko Haga) writes:
Windows95 $B$G(B tcl7.6/tk4.2 $B$K(B 7.5/4.1 $BMQ&AHGF|K\8l2=(B
$B%Q%C%A$rL5M}LpM}$"$F$F;H$C$F$^$9!#(B
$B?bD>$"$k$$$O?eJ?$N(B line item $B$K(B -stipple $B$r;XDj$9$k$H(B
$B8+$($J$/$J$C$F$7$^$$$^$9!#(B
$B3QEY$rJQ$($F$$$/$H$@$s$@$s(Bline $B$,C;$/$J$C$F$$$/$h$&$K(B
$B8+$(!"?bD>(B/$B?eJ?$K$J$k$H>C$($^$9!#(B
$BF1$88=>]$K2q$o$l$?J}!"2r7h:v$r$4B8CN$NJ}$O$$$i$C$7$c(B
$B$i$J$$$G$7$g$&$+!)(B
$B%i%9%?%*%Z%l!<%7%g%s$N:]$N:n6HNN0h$r<h$k$H$-$K@~$NB@$5$r(B
$B9MN8$7$F$$$J$$$N$,860x$G$7$?!#(B
$B%Q%C%A$K$7$H$-$^$7$?$N$G!"I,MW$JJ}$O$I$&$>!#(B
$B%P%0$J$I$"$j$^$7$?$i(B haga@sra.co.jp $B$^$G!#(B
$B!t;HMQ$O$4<+?H$N@UG$$G$*4j$$$7$^$9!#(B
*** tkWinDraw.c.org Wed Nov 27 17:13:44 1996
--- tkWinDraw.c Wed Nov 27 19:27:51 1996
***************
*** 879,886 ****
}
! width = rect.right - rect.left;
! height = rect.bottom - rect.top;
/*
* Select stipple pattern into destination dc.
--- 879,886 ----
}
! width = rect.right - rect.left + gc->line_width;
! height = rect.bottom - rect.top + gc->line_width;
/*
* Select stipple pattern into destination dc.
***************
*** 898,904 ****
oldBitmap = SelectObject(dcMem, CreateCompatibleBitmap(dc, width,
height));
oldPen = SelectObject(dcMem, pen);
! BitBlt(dcMem, 0, 0, width, height, dc, rect.left, rect.top, SRCCOPY);
/*
* Translate the object to 0,0 for rendering in the temporary drawing
--- 898,905 ----
oldBitmap = SelectObject(dcMem, CreateCompatibleBitmap(dc, width,
height));
oldPen = SelectObject(dcMem, pen);
! BitBlt(dcMem, 0, 0, width, height, dc, rect.left - gc->line_width / 2,
! rect.top - gc->line_width / 2, SRCCOPY);
/*
* Translate the object to 0,0 for rendering in the temporary drawing
***************
*** 906,913 ****
*/
for (i = 0; i < npoints; i++) {
! winPoints[i].x -= rect.left;
! winPoints[i].y -= rect.top;
}
/*
--- 907,914 ----
*/
for (i = 0; i < npoints; i++) {
! winPoints[i].x -= rect.left - gc->line_width / 2;
! winPoints[i].y -= rect.top - gc->line_width / 2;
}
/*
***************
*** 919,925 ****
: WINDING);
oldMemBrush = SelectObject(dcMem, CreateSolidBrush(gc->foreground));
(*func)(dcMem, winPoints, npoints);
! BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0, COPYFG);
/*
* If we are rendering an opaque stipple, then draw the polygon in the
--- 920,928 ----
: WINDING);
oldMemBrush = SelectObject(dcMem, CreateSolidBrush(gc->foreground));
(*func)(dcMem, winPoints, npoints);
! BitBlt(dc, rect.left - gc->line_width / 2,
! rect.top - gc->line_width / 2, width, height, dcMem, 0, 0,
! COPYFG);
/*
* If we are rendering an opaque stipple, then draw the polygon in the
***************
*** 931,937 ****
DeleteObject(SelectObject(dcMem,
CreateSolidBrush(gc->background)));
(*func)(dcMem, winPoints, npoints);
! BitBlt(dc, rect.left, rect.top, width, height, dcMem, 0, 0,
COPYBG);
}
--- 934,941 ----
DeleteObject(SelectObject(dcMem,
CreateSolidBrush(gc->background)));
(*func)(dcMem, winPoints, npoints);
! BitBlt(dc, rect.left - gc->line_width / 2,
! rect.top - gc->line_width / 2, width, height, dcMem, 0, 0,
COPYBG);
}
Technical Details
Message-ID:
<HAGA.96Nov27200808@srashc.sra.CO.JP>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<HAGA.96Nov13114153@srashc.sra.CO.JP>Show Full Headers
Complete Article Headers
X-Google-Language: Japanese,JIS X-Google-Thread: 15a83d,b61a27e721e197f4 X-Google-Attributes: gid15a83d,public From: haga@sra.CO.JP (Toshihiko Haga) Subject: Re: trouble of stipple Date: 1996/11/27 Message-ID: <HAGA.96Nov27200808@srashc.sra.CO.JP> X-Deja-AN: 201015558 distribution: world references: <HAGA.96Nov13114153@srashc.sra.CO.JP> organization: Software Research Associates, Inc., Japan newsgroups: fj.lang.tcl