forked from google/gxui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcanvas.go
More file actions
27 lines (24 loc) · 749 Bytes
/
Copy pathcanvas.go
File metadata and controls
27 lines (24 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package gxui
import (
"github.com/google/gxui/math"
)
type Canvas interface {
Size() math.Size
Complete()
Push()
Pop()
AddClip(math.Rect)
Clear(Color)
DrawCanvas(c Canvas, position math.Point)
DrawTexture(t Texture, bounds math.Rect)
DrawText(Font, string, Color, math.Rect, HorizontalAlignment, VerticalAlignment)
DrawRunes(font Font, runes []rune, color Color, points []math.Point, origin math.Point)
DrawLines(Polygon, Pen)
DrawPolygon(Polygon, Pen, Brush)
DrawRect(math.Rect, Brush)
DrawRoundedRect(rect math.Rect, tl, tr, bl, br float32, p Pen, b Brush)
Release()
}