Snap line drawing
This commit is contained in:
parent
dd4775eb64
commit
7519bf8c0a
|
@ -124,7 +124,8 @@
|
||||||
( ) DUP2 #0200 NEQ2 ?{ file-save }
|
( ) DUP2 #0200 NEQ2 ?{ file-save }
|
||||||
DUP2 #0200 NEQ2 ?{
|
DUP2 #0200 NEQ2 ?{
|
||||||
( from ) ,&x1 LDR2 ,&y1 LDR2
|
( from ) ,&x1 LDR2 ,&y1 LDR2
|
||||||
( to ) .Mouse/x DEI2 .Mouse/y DEI2 #0012 SUB2
|
( to x ) ,&x1 LDR2 .Mouse/x DEI2 snap
|
||||||
|
( to y ) ,&y1 LDR2 .Mouse/y DEI2 #0012 SUB2 snap
|
||||||
( paint ) #01 <paint-line>
|
( paint ) #01 <paint-line>
|
||||||
<draw-sketch> }
|
<draw-sketch> }
|
||||||
DUP2 #00 NEQ #0001 NEQ2 ?{
|
DUP2 #00 NEQ #0001 NEQ2 ?{
|
||||||
|
@ -251,6 +252,10 @@
|
||||||
!&>while
|
!&>while
|
||||||
&end POP2r JMP2r
|
&end POP2r JMP2r
|
||||||
|
|
||||||
|
@snap ( x1* x2* -- x* )
|
||||||
|
SUB2k abs2 #0008 LTH2 ?{ NIP2 JMP2r }
|
||||||
|
POP2 JMP2r
|
||||||
|
|
||||||
(
|
(
|
||||||
@|selection )
|
@|selection )
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue