Tk Library Source Code

Artifact [2a6805ba01]
Login

Artifact 2a6805ba01e3f3edc75b5cbf5896c0c9539b7c9e312260582f127dcbad58e874:

Attachment "diagrams.diff" to ticket [e9c4eeae1f] added by anonymous 2024-07-23 19:03:49. (unpublished)
Index: modules/diagrams/application.tcl
==================================================================
--- modules/diagrams/application.tcl
+++ modules/diagrams/application.tcl
@@ -382,10 +382,11 @@
     #.c configure -cursor tcross
     #crosshair::crosshair .c -width 0 -fill \#999999 -dash {.}
     #crosshair::track on  .c TRACK
 
     wm deiconify .
+    wm protocol . WM_DELETE_WINDOW ::exit
     return
 }
 
 proc ::diagram::application::Run::GUI::ShowPicture {dip} {
 

Index: modules/diagrams/basic.tcl
==================================================================
--- modules/diagrams/basic.tcl
+++ modules/diagrams/basic.tcl
@@ -1269,11 +1269,19 @@
     # # ## ### ##### ######## ############# ######################
 }
 
 namespace eval ::diagram::basic::geo {
     namespace import ::math::geometry::*
+    proc direction {angle} {
+	lassign [::math::geometry::direction $angle] x y
+	return [list $x [expr {- $y}]]
+    }
+    proc octant {p} {
+	lassign $p x y
+	return [::math::geometry::octant [list $x [expr {- $y}]]]
+    }
 }
 
 # # ## ### ##### ######## ############# ######################
 ## Ready
 
 package provide diagram::basic 1.0.1

Index: modules/diagrams/core.tcl
==================================================================
--- modules/diagrams/core.tcl
+++ modules/diagrams/core.tcl
@@ -1113,8 +1113,12 @@
 # # ## ### ##### ######## ############# ######################
 ## Ready
 
 namespace eval ::diagram::core::geo {
     namespace import ::math::geometry::*
+    proc direction {angle} {
+	lassign [::math::geometry::direction $angle] x y
+	return [list $x [expr {- $y}]]
+    }
 }
 
 package provide diagram::core 1

Index: modules/diagrams/element.tcl
==================================================================
--- modules/diagrams/element.tcl
+++ modules/diagrams/element.tcl
@@ -288,11 +288,15 @@
     # # ## ### ##### ######## ############# ######################
 }
 
 namespace eval ::diagram::element::geo {
     namespace import ::math::geometry::*
+    proc direction {angle} {
+	lassign [::math::geometry::direction $angle] x y
+	return [list $x [expr {- $y}]]
+    }
 }
 
 # # ## ### ##### ######## ############# ######################
 ## Ready
 
 package provide diagram::element 1

Index: modules/diagrams/point.tcl
==================================================================
--- modules/diagrams/point.tcl
+++ modules/diagrams/point.tcl
@@ -177,8 +177,12 @@
 # # ## ### ##### ######## ############# ######################
 ## Ready
 
 namespace eval ::diagram::point::geo {
     namespace import ::math::geometry::*
+    proc direction {angle} {
+	lassign [::math::geometry::direction $angle] x y
+	return [list $x [expr {- $y}]]
+    }
 }
 
 package provide diagram::point 1