diff --git a/pkgs/gui-pkgs/gui-doc/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl b/pkgs/gui-pkgs/gui-doc/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl index 5d0b6a7d7c..a18da120e0 100644 --- a/pkgs/gui-pkgs/gui-doc/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl +++ b/pkgs/gui-pkgs/gui-doc/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl @@ -59,6 +59,15 @@ different nodes. } +@defmethod[(set-edge-label-font [font (is-a?/c font%)]) void?]{ + Updates the font used to draw the edge labels. +} + +@defmethod[(get-edge-label-font) (is-a?/c font%)]{ + Returns the font currently being used to draw the edge labels +} + + @defmethod[(draw-edges [dc (is-a?/c dc<%>)] [left real?] [top real?] @@ -116,8 +125,9 @@ it just draws the line. [point3 (is-a?/c point%)] [point4 (is-a?/c point%)]) void?]{ -Updates the arguments @racket[point1], @racket[point2], @racket[point3], @racket[point4] with the coordinates -of an arrowhead for a line that connects (@racket[from-x],@racket[from-y]) to (@racket[to-x],@racket[to-y]). +Updates the arguments @racket[point1], @racket[point2], @racket[point3], @racket[point4] +with the coordinates of an arrowhead for a line that connects (@racket[from-x],@racket[from-y]) +to (@racket[to-x],@racket[to-y]). } } diff --git a/pkgs/gui-pkgs/gui-lib/mrlib/private/graph.rkt b/pkgs/gui-pkgs/gui-lib/mrlib/private/graph.rkt index 3e00e279df..8cd89bec34 100644 --- a/pkgs/gui-pkgs/gui-lib/mrlib/private/graph.rkt +++ b/pkgs/gui-pkgs/gui-lib/mrlib/private/graph.rkt @@ -204,6 +204,11 @@ [edge-labels? #t] [cache-arrow-drawing? #f]) + (define/public (set-edge-label-font f) + (set! edge-label-font f) + (invalidate-bitmap-cache)) + (define/public (get-edge-label-font) edge-label-font) + (define draw-arrow-heads? #t) (define flip-labels? #t) (inherit refresh get-admin)