Skip to content

Commit

Permalink
add common accessors
Browse files Browse the repository at this point in the history
  • Loading branch information
BuckarooBanzay committed Jun 21, 2024
1 parent 9a0245a commit 239dcb9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions accessor.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package types

import "image/color"

// returns the node at the given position, nil if no node found
type NodeAccessor func(pos *Pos) (*Node, error)

// resolves the node-name and param2 to a color, nil if no color-mapping found
type ColorResolver func(name string, param2 int) *color.RGBA

0 comments on commit 239dcb9

Please sign in to comment.