🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

4 total messages Started by Shigeki Ohira Fri, 07 Nov 1997 00:00
[Q] I can't line precisely on canvas..
#196
Author: Shigeki Ohira
Date: Fri, 07 Nov 1997 00:00
72 lines
3069 bytes
$B=i$a$FEj9F$7$^$9!#(B

$B8=:_!"BPOC%G!<%?J,(B$B@OMQ$N%D!<%k$r:n$C$F$$$k$N$G$9$,!"(B
$B$=$N5!G=$N0l$D$H$7$F!"0lDj6h4V$NIA2h(B(line)$B$H$=$N>e$X$N(B
$B%i%Y%kE=$j!"(B$B$H$$$&$b$N$r9M$($F$*$j$^$9!#(B

$BLdBj$J$N$O!"%9%/%m!<%k2DG=(B($B#xJ}8~(B)$B$J%-%c%s%P%9>e$N(B
$BG$0U$N#2E@!J$3$N#2E@(B$B$O8=:_I=<($5$l$F$$$kItJ,$K8B$k!K$r(B
$B%^%&%9$N:8%\%?%s$G%I%i%C%0$9$k$3$H$K$h$C$F$=$N5wN%$r(B
$B@~$G7k$V$H$$$&(B$BC1=c$J:n6H$K$b4X$o$i$:!"$&$^$/IA2h$5$l$J$$(B
$B$H$$$&$3$H$G$9!#(B
$B:G=i$N!"%9%/%m!<%k%P!<$,0lHV:8$K$"$k>uBV$G(B$B$OLdBj$"$j$^$;$s!#(B
$B%9%/%m!<%k%P!<Ey$rMQ$$$F1&J}8~$K%9%/%m!<%k$5$;$?>l9g!"(B
$B;OE@$,$O$k$+:8$NJ}$K$"$C$F=*(B$BE@$N$_@5>o0LCV$K%W%m%C%H$5$l$^$9!#(B

$B$3$NItJ,$O<!$N$h$&$J%W%m%0%i%`$K$J$C$F$*$j$^$9!#(B
$B?tCME*$K$O@5$7$$(B$BCM$rJV$7$F$*$j!"$=$N860x$,J,$+$j$^$;$s!#(B
$B$I$&$>!"$h$m$7$/$*4j$$$$$?$7$^$9!#(B
($B%W%m%0%i%`Cf$NJQ?t(B count $B$O!"(Bundo $BA`:n$N$b$N$G$9$N$G!"(B
 $B5$$K$7$J$$$G$/$@$5$$(B)

-----<from here>--------------------------
set work .frame.work
frame $work -relief raised
scrollbar $work.scroll -bd 2 -relief sunken -width 12 \
   -orient horizontal -command "$work.canvas xview"
set c1 $work.canvas
canvas $c1 -scrollregion {0c 0c 362c 26.2c} -width 22c -height 26.2c \
   -relief sunken -borderwidth 2 -xscrollcommand "$work.scroll set"

set count 1
set dx1($count) 0    ;### $B:BI8MQG[Ns$N=i4|@_Dj(B (dx1,dy1)-(dx2,dy2)
set dy1($count) 0
set dx2($count) 0
set dy2($count) 0 

bind $c1 <ButtonPress-1> "CanvB1Press $c1 %x %y"

proc CanvB1Press {sheet x y} {
  global dx1 dy1 dx2 dy2 count
  set c $sheet
  set sx [$c canvasx $x]
  set sy [$c canvasy $y]

  bind $c <ButtonRelease-1> "drawLine $c $x $y %x %y"
  proc drawLine {c sx sy cx cy} {
    global dx1 dy1 dx2 dy2 count
    set cx [$c canvasx $cx]
    $c create line $sx $sy $cx $sy -width 2 -fill red
    set dx1($count) $sx
    set dy1($count) $sy
    set dx2($count) $cx
    set dy2($count) $sy
    puts ($sx,$sy)-($cx,$sy) ;### $B3NG'=PNO(B
    incr count
  }
}

------<to here>-------------------------------------




--
    $B"i(B    $B"i(B   []=====================================[]
   $B"i(B$B!2(B  $B!2"i(B  []  $BAa0pEDBg3X(B $BM}9)3XIt(B $B>pJs3X2J#4G/(B   []
   $B"j"~(!"~($(B  [] $BCN<1>pJs9)3X@l96(B $BGr0f8&5f<<(B $B2;@<(B$BHI(B  []
   $B"j(B  $B"](B  $B"_(B  []      $BBgJ?(B $BLP51(B (Ohira Shigeki)      []
   $B"j!@"^!?"j(B  []E-mail:ohira@shirai.info.waseda.ac.jp[]
     $B!@!1!?(B    []=====================================[]       
       $B"w(B      
Re: [Q] I can't line precisely on canvas..
#198
Author: Nagao Shijo
Date: Fri, 07 Nov 1997 00:00
67 lines
2372 bytes
<G94P0211.97Nov8020730@wise21.mn.waseda.ac.jp>$B$N5-;v$K$*$$$F(B
g94p0211@mn.waseda.ac.jp$B$5$s$O=q$-$^$7$?!#(B

>> $B=i$a$FEj9F$7$^$9!#(B
-- big snip --

S.Nagao@rimnet $B$H?=$7$^$9!#(B

$B$b$&2r7h$7$F$k$+$bCN$l$^$;$s$,(B ...


($B$3$3$+$i(B)
#-------------------------------------------------------------
wm withdraw .                                ;# added for testing.
toplevel .frame                              ;#

set work .frame.work
frame $work -relief raised
set c1 $work.canvas
canvas $c1 -scrollregion {0c 0c 362c 26.2c} -width 22c -height 26.2c \
   -relief sunken -borderwidth 2 -xscrollcommand "$work.scroll set"
scrollbar $work.scroll -bd 2 -relief sunken -width 12 \
   -orient horizontal -command "$work.canvas xview"

pack $work                                  ;# added for testing.
pack $work.canvas -fill both -expand yes    ;#
pack $work.scroll -fill x                   ;# 
      

set count 1
set dx1($count) 0    ;### $B:BI8MQG[Ns$N=i4|@_Dj(B (dx1,dy1)-(dx2,dy2)
set dy1($count) 0
set dx2($count) 0
set dy2($count) 0 

bind $c1 <ButtonPress-1> "CanvB1Press $c1 %x %y"

proc CanvB1Press {sheet x y} {
  global dx1 dy1 dx2 dy2 count
  set c $sheet
  set sx [$c canvasx $x]
  set sy [$c canvasy $y]

  bind $c <ButtonRelease-1> "drawLine $c $x $y %x %y"
  proc drawLine {c sx sy cx cy} {
    global dx1 dy1 dx2 dy2 count
    set cx [$c canvasx $cx]
    set sx [$c canvasx $sx]      ;# <<-------------- add this line.
    $c create line $sx $sy $cx $sy -width 2 -fill red
    set dx1($count) $sx
    set dy1($count) $sy
    set dx2($count) $cx
    set dy2($count) $sy
    puts ($sx,$sy)-($cx,$sy) ;### $B3NG'=PNO(B
    incr count
  }
}

#---------------------------------------------------------
($B$3$3$^$G(B)


--------------------------------------------------------
Shijo, Nagao
mailto:nagao@hf.rim.or.jp
http://www.hf.rim.or.jp/~nagao/
Re: [Q] I can't line precisely on canvas..
#199
Author: UEKI Masahiro
Date: Sun, 09 Nov 1997 00:00
17 lines
1012 bytes
$B?"LZ!wEl9)Bg$H?=$7$^$9!#(B

> $B%9%/%m!<%k%P!<Ey$rMQ$$$F1&J}8~$K%9%/%m!<%k$5$;$?>l9g!"(B
> $B;OE@$,$O$k$+:8$NJ}$K$"$C$F=*E@$N$_@5>o0LCV$K%W%m%C%H$5$l$^$9!#(B

$B$N$3$H$G$9$,!"C1$J$k(B typo $B$N$h$&$J5$$,$7$^$9!#(B

> proc CanvB1Press {sheet x y} {
>   global dx1 dy1 dx2 dy2 count
>   set c $sheet
>   set sx [$c canvasx $x]
>   set sy [$c canvasy $y]
> 
>   bind $c <ButtonRelease-1> "drawLine $c $x $y %x %y"

drawLine $B$NBh#2!"Bh#30z?t$O(B $sx $B$H(B $sy $B$,@5$7$$$s$8$c$"$j$^$;$s$+!#(B
Re: [Q] I can't line precisely on canvas..
#202
Author: Shigeki Ohira
Date: Sat, 15 Nov 1997 00:00
38 lines
1953 bytes
$BBgJ?!wAa0pED$G$9!#(B

 |$B%9%/%m!<%k%P!<Ey$rMQ$$$F1&J}8~$K%9%/%m!<%k$5$;$?>l9g!"(B
 |$B;OE@$,$O$k$+:8$NJ}$K$"(B$B$C$F=*E@$N$_@5>o0LCV$K%W%m%C%H$5$l$^$9!#(B
 |
 |proc CanvB1Press {sheet x y} {
 |  global dx1 dy1 dx2 dy2 count
 |  set c $sheet
 |  set sx [$c canvasx $x]
 |  set sy [$c canvasy $y]
 |
 |  bind $c <ButtonRelease-1> "drawLine $c $x $y %x %y"
 |  proc drawLine {c sx sy cx cy} {
 |    global dx1 dy1 dx2 dy2 count
 |    set cx [$c canvasx $cx]
 |    $c create line $sx $sy $cx $sy -width 2 -fill red
 |    set dx1($count) $sx
 |    set dy1($count) $sy
 |    set dx2($count) $cx
 |    set dy2($count) $sy
 |    puts ($sx,$sy)-($cx,$sy) ;### $B3NG'=PNO(B
 |    incr count
 |  }
 |}

$B%U%)%m!<%"%C%W$N$H$*$j!"JQ?t$N<u(B$B$1EO$7$r4V0c$($F$*$j$^$7$?!#(B
bind $c <ButtonRelease-1> "drawLine $c $sx $sy %x %y"
$B$H$9$k$3$H$G!"L\E*(B$B$r2L$?$9$3$H$,$G$-$^$7$?!#(B
$B%U%)%m!<$7$F$/$@$5$C$?J}!9!"$"$j$,$H$&$4$6$$$^$7$?!#(B
--
    $B"i(B    $B"i(B   []=====================================[]
   $B"i!2(B  $B!2"i(B  []  $BAa0pEDBg3X(B $BM}9)3XIt(B $B>pJs3X2J#4G/(B   []
   $B"j(B$B"~(!"~($(B  [] $BCN<1>pJs9)3X@l96(B $BGr0f8&5f<<(B $B2;@<HI(B  []
   $B"j(B  $B"](B  $B"_(B  []      $BBgJ?(B $BLP51(B (Ohira Shigeki)      []
   $B"j!@"^!?"j(B  []E-mail:ohira@shirai.info.waseda.ac.jp[]
     $B!@!1!?(B    []=====================================[]       
       $B"w(B      
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads