aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/llgcode/draw2d/samples/samples.go
blob: ff30559ab69a669a93d5b4d1b8d56dfaa8e132ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Package samples provides examples which can be used with different
// backends. They are also used for testing and coverage of the
// draw2d package.
package samples

import "fmt"

// Resource returns a resource filename for testing.
func Resource(folder, filename, ext string) string {
	var root string
	if ext == "pdf" {
		root = "../"
	}
	return fmt.Sprintf("%sresource/%s/%s", root, folder, filename)
}

// Output returns the output filename for testing.
func Output(name, ext string) string {
	var root string
	if ext == "pdf" {
		root = "../"
	}
	return fmt.Sprintf("%soutput/samples/%s.%s", root, name, ext)
}