initial commit, everything works

This commit is contained in:
Cadey Ratio 2017-12-29 17:10:53 -05:00
commit 221c2ebe49
1141 changed files with 462726 additions and 0 deletions

69
Gopkg.lock generated Normal file
View File

@ -0,0 +1,69 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
name = "github.com/Xe/ln"
packages = [".","ex"]
revision = "466e05b2ef3e48ce08a367b6aaac09ee29a124e5"
version = "v0.1"
[[projects]]
name = "github.com/fogleman/gg"
packages = ["."]
revision = "6166aa3c1afaee416f384645a81636267aee6d25"
version = "v1.0.0"
[[projects]]
branch = "master"
name = "github.com/golang/freetype"
packages = ["raster","truetype"]
revision = "e2365dfdc4a05e4b8299a783240d4a7d5a65d4e4"
[[projects]]
branch = "master"
name = "github.com/golang/groupcache"
packages = [".","consistenthash","groupcachepb","lru","singleflight"]
revision = "84a468cf14b4376def5d68c722b139b881c450a4"
[[projects]]
branch = "master"
name = "github.com/golang/protobuf"
packages = ["proto"]
revision = "1e59b77b52bf8e4b449a57e6f79f21226d571845"
[[projects]]
branch = "master"
name = "github.com/jakobvarmose/go-qidenticon"
packages = ["."]
revision = "5c327fb4e74a797388267ff72353ab965e8c187d"
[[projects]]
name = "github.com/pkg/errors"
packages = ["."]
revision = "645ef00459ed84a119197bfb8d8205042c6df63d"
version = "v0.8.0"
[[projects]]
branch = "master"
name = "golang.org/x/image"
packages = ["font","font/basicfont","font/plan9font","math/fixed"]
revision = "12117c17ca67ffa1ce22e9409f3b0b0a93ac08c7"
[[projects]]
branch = "master"
name = "golang.org/x/net"
packages = ["context","internal/timeseries","trace"]
revision = "d866cfc389cec985d6fda2859936a575a55a3ab6"
[[projects]]
name = "gopkg.in/chi.v3"
packages = ["."]
revision = "e83ac2304db3c50cf03d96a2fcd39009d458bc35"
version = "v3.3.2"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
inputs-digest = "00d95a58026c595436556f0e477e217c30d776fbe877404204d1c8b51e956677"
solver-name = "gps-cdcl"
solver-version = 1

38
Gopkg.toml Normal file
View File

@ -0,0 +1,38 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
[[constraint]]
name = "github.com/Xe/ln"
version = "0.1.0"
[[constraint]]
branch = "master"
name = "github.com/golang/groupcache"
[[constraint]]
branch = "master"
name = "github.com/jakobvarmose/go-qidenticon"
[[constraint]]
name = "gopkg.in/chi.v3"
version = "3.3.2"

19
LICENSE Normal file
View File

@ -0,0 +1,19 @@
Copyright (c) 2017 Christine Dodrill <me@christine.website>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

BIN
cmd/identicond/.DS_Store vendored Normal file

Binary file not shown.

55
cmd/identicond/main.go Normal file
View File

@ -0,0 +1,55 @@
package main
import (
"bytes"
"image/png"
"net/http"
"os"
"github.com/Xe/ln"
"github.com/Xe/ln/ex"
"github.com/golang/groupcache"
qidenticon "github.com/jakobvarmose/go-qidenticon"
chi "gopkg.in/chi.v3"
)
const (
avatarWidth = 512
fiftyMegs = 1024 * 1024 * 50
)
func makeQidenticon(ctx groupcache.Context, key string, dest groupcache.Sink) error {
img := qidenticon.Render(qidenticon.Code(key), avatarWidth, qidenticon.DefaultSettings())
buf := bytes.NewBuffer(nil)
err := png.Encode(buf, img)
if err != nil {
return err
}
dest.SetBytes(buf.Bytes())
return nil
}
func main() {
g := groupcache.NewGroup("identicons", fiftyMegs, groupcache.GetterFunc(makeQidenticon))
r := chi.NewRouter()
r.Use(ex.HTTPLog)
r.Get("/{hash}", func(w http.ResponseWriter, r *http.Request) {
var bs []byte
sink := groupcache.AllocatingByteSliceSink(&bs)
hash := chi.URLParam(r, "hash")
err := g.Get(r.Context(), hash, sink)
if err != nil {
ln.Error(r.Context(), err, ln.Action("can't get hash"), ln.F{"hash": hash})
http.Error(w, "internal server error, please contact the admin", http.StatusInternalServerError)
return
}
w.Header().Add("Content-Type", "image/png")
w.Write(bs)
})
http.ListenAndServe(":"+os.Getenv("PORT"), r)
}

25
vendor/github.com/Xe/ln/LICENSE generated vendored Normal file
View File

@ -0,0 +1,25 @@
Copyright (c) 2015, Andrew Gwozdziewycz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

29
vendor/github.com/Xe/ln/README.md generated vendored Normal file
View File

@ -0,0 +1,29 @@
# ln: The Natural Logger for Go
`ln` provides a simple interface to logging, and metrics, and
obviates the need to utilize purpose built metrics packages, like
`go-metrics` for simple use cases.
The design of `ln` centers around the idea of key-value pairs, which
can be interpreted on the fly, but "Filters" to do things such as
aggregated metrics, and report said metrics to, say Librato, or
statsd.
"Filters" are like WSGI, or Rack Middleware. They are run "top down"
and can abort an emitted log's output at any time, or continue to let
it through the chain. However, the interface is slightly different
than that. Rather than encapsulating the chain with partial function
application, we utilize a simpler method, namely, each plugin defines
an `Apply` function, which takes as an argument the log event, and
performs the work of the plugin, only if the Plugin "Applies" to this
log event.
If `Apply` returns `false`, the iteration through the rest of the
filters is aborted, and the log is dropped from further processing.
## Current Status: Initial Development / Concept
## Copyright
(c) 2015, Andrew Gwozdziewycz, BSD Licensed. See LICENSE for more
info.

11
vendor/github.com/Xe/ln/action.go generated vendored Normal file
View File

@ -0,0 +1,11 @@
package ln
// Action is a convenience helper for logging the "action" being performed as
// part of a log line.
//
// It is a convenience wrapper for the following:
//
// ln.Log(ctx, fer, f, ln.Action("writing frozberry sales reports to database"))
func Action(act string) Fer {
return F{"action": act}
}

38
vendor/github.com/Xe/ln/context.go generated vendored Normal file
View File

@ -0,0 +1,38 @@
package ln
import (
"context"
)
type ctxKey int
const (
fKey = iota
)
// WithF stores or appends a given F instance into a context.
func WithF(ctx context.Context, f F) context.Context {
pf, ok := FFromContext(ctx)
if !ok {
return context.WithValue(ctx, fKey, f)
}
pf.Extend(f)
return context.WithValue(ctx, fKey, pf)
}
// FFromContext fetches the `F` out of the context if it exists.
func FFromContext(ctx context.Context) (F, bool) {
fvp := ctx.Value(fKey)
if fvp == nil {
return nil, false
}
f, ok := fvp.(F)
if !ok {
return nil, false
}
return f, true
}

25
vendor/github.com/Xe/ln/doc.go generated vendored Normal file
View File

@ -0,0 +1,25 @@
/*
Package ln is the Natural Logger for Go
`ln` provides a simple interface to logging, and metrics, and
obviates the need to utilize purpose built metrics packages, like
`go-metrics` for simple use cases.
The design of `ln` centers around the idea of key-value pairs, which
can be interpreted on the fly, but "Filters" to do things such as
aggregated metrics, and report said metrics to, say Librato, or
statsd.
"Filters" are like WSGI, or Rack Middleware. They are run "top down"
and can abort an emitted log's output at any time, or continue to let
it through the chain. However, the interface is slightly different
than that. Rather than encapsulating the chain with partial function
application, we utilize a simpler method, namely, each plugin defines
an `Apply` function, which takes as an argument the log event, and
performs the work of the plugin, only if the Plugin "Applies" to this
log event.
If `Apply` returns `false`, the iteration through the rest of the
filters is aborted, and the log is dropped from further processing.
*/
package ln

7
vendor/github.com/Xe/ln/ex/doc.go generated vendored Normal file
View File

@ -0,0 +1,7 @@
/*
Package ex is a set of extensions and middleware for ln.
This package will (inevitably) have a lot of third-party dependencies and
as such might be broken apart into other packages in the future.
*/
package ex

68
vendor/github.com/Xe/ln/ex/gotrace.go generated vendored Normal file
View File

@ -0,0 +1,68 @@
package ex
import (
"context"
"log"
"github.com/Xe/ln"
"golang.org/x/net/trace"
)
type goEventLogger struct {
ev trace.EventLog
}
// NewGoEventLogger will log ln information to a given trace.EventLog instance.
func NewGoEventLogger(ev trace.EventLog) ln.Filter {
return &goEventLogger{ev: ev}
}
func (gel *goEventLogger) Apply(ctx context.Context, e ln.Event) bool {
data, err := ln.DefaultFormatter.Format(ctx, e)
if err != nil {
log.Printf("wtf: error in log formatting: %v", err)
return false
}
if everr := e.Data["err"]; everr != nil {
gel.ev.Errorf("%s", string(data))
return true
}
gel.ev.Printf("%s", string(data))
return true
}
func (gel *goEventLogger) Close() { gel.ev.Finish() }
func (gel *goEventLogger) Run() {}
type sst string
func (s sst) String() string { return string(s) }
func goTraceLogger(ctx context.Context, e ln.Event) bool {
sp, ok := trace.FromContext(ctx)
if !ok {
return true // no trace in context
}
data, err := ln.DefaultFormatter.Format(ctx, e)
if err != nil {
log.Printf("wtf: error in log formatting: %v", err)
return false
}
if everr := e.Data["err"]; everr != nil {
sp.SetError()
}
sp.LazyLog(sst(string(data)), false)
return true
}
// NewGoTraceLogger will log ln information to a golang.org/x/net/trace.Trace
// if it is present in the context of ln calls.
func NewGoTraceLogger() ln.Filter {
return ln.FilterFunc(goTraceLogger)
}

36
vendor/github.com/Xe/ln/ex/http.go generated vendored Normal file
View File

@ -0,0 +1,36 @@
package ex
import (
"net"
"net/http"
"time"
"github.com/Xe/ln"
)
func HTTPLog(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
host, _, _ := net.SplitHostPort(r.RemoteAddr)
f := ln.F{
"remote_ip": host,
"x_forwarded_for": r.Header.Get("X-Forwarded-For"),
"path": r.URL.Path,
}
ctx := ln.WithF(r.Context(), f)
st := time.Now()
next.ServeHTTP(w, r.WithContext(ctx))
af := time.Now()
f["request_duration"] = af.Sub(st)
ws, ok := w.(interface {
Status() int
})
if ok {
f["status"] = ws.Status()
}
ln.Log(r.Context(), f)
})
}

25
vendor/github.com/Xe/ln/ex/l2met.go generated vendored Normal file
View File

@ -0,0 +1,25 @@
package ex
import (
"time"
"github.com/Xe/ln"
)
// This file deals with formatting of [l2met] style metrics.
// [l2met]: https://r.32k.io/l2met-introduction
// Counter formats a value as a metrics counter.
func Counter(name string, value int) ln.Fer {
return ln.F{"count#" + name: value}
}
// Gauge formats a value as a metrics gauge.
func Gauge(name string, value int) ln.Fer {
return ln.F{"gauge#" + name: value}
}
// Measure formats a value as a metrics measure.
func Measure(name string, ts time.Time) ln.Fer {
return ln.F{"measure#" + name: time.Since(ts)}
}

51
vendor/github.com/Xe/ln/example/http.go generated vendored Normal file
View File

@ -0,0 +1,51 @@
// +build ignore
package main
import (
"context"
"flag"
"net/http"
"time"
"github.com/Xe/ln"
"github.com/Xe/ln/ex"
"github.com/facebookgo/flagenv"
"golang.org/x/net/trace"
)
var (
port = flag.String("port", "2145", "http port to listen on")
tracingFamily = flag.String("trace-family", "ln example", "tracing family to use for x/net/trace")
)
func main() {
flagenv.Parse()
flag.Parse()
ln.DefaultLogger.Filters = append(ln.DefaultLogger.Filters, ex.NewGoTraceLogger())
http.HandleFunc("/", handleIndex)
http.ListenAndServe(":"+*port, middlewareSpan(ex.HTTPLog(http.DefaultServeMux)))
}
func middlewareSpan(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
sp := trace.New(*tracingFamily, "HTTP request")
defer sp.Finish()
ctx, cancel := context.WithTimeout(r.Context(), 30*time.Second)
defer cancel()
ctx = trace.NewContext(ctx, sp)
next.ServeHTTP(w, r.WithContext(ctx))
})
}
func handleIndex(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
ln.Log(ctx, ln.Action("index"), ln.F{"there_is": "no_danger"})
http.Error(w, "There is no danger citizen", http.StatusOK)
}

67
vendor/github.com/Xe/ln/filter.go generated vendored Normal file
View File

@ -0,0 +1,67 @@
package ln
import (
"context"
"io"
"sync"
)
// Filter interface for defining chain filters
type Filter interface {
Apply(ctx context.Context, e Event) bool
Run()
Close()
}
// FilterFunc allows simple functions to implement the Filter interface
type FilterFunc func(ctx context.Context, e Event) bool
// Apply implements the Filter interface
func (ff FilterFunc) Apply(ctx context.Context, e Event) bool {
return ff(ctx, e)
}
// Run implements the Filter interface
func (ff FilterFunc) Run() {}
// Close implements the Filter interface
func (ff FilterFunc) Close() {}
// WriterFilter implements a filter, which arbitrarily writes to an io.Writer
type WriterFilter struct {
sync.Mutex
Out io.Writer
Formatter Formatter
}
// NewWriterFilter creates a filter to add to the chain
func NewWriterFilter(out io.Writer, format Formatter) *WriterFilter {
if format == nil {
format = DefaultFormatter
}
return &WriterFilter{
Out: out,
Formatter: format,
}
}
// Apply implements the Filter interface
func (w *WriterFilter) Apply(ctx context.Context, e Event) bool {
output, err := w.Formatter.Format(ctx, e)
if err == nil {
w.Lock()
w.Out.Write(output)
w.Unlock()
}
return true
}
// Run implements the Filter interface
func (w *WriterFilter) Run() {}
// Close implements the Filter interface
func (w *WriterFilter) Close() {}
// NilFilter is safe to return as a Filter, but does nothing
var NilFilter = FilterFunc(func(_ context.Context, e Event) bool { return true })

111
vendor/github.com/Xe/ln/formatter.go generated vendored Normal file
View File

@ -0,0 +1,111 @@
package ln
import (
"bytes"
"context"
"fmt"
"time"
)
var (
// DefaultTimeFormat represents the way in which time will be formatted by default
DefaultTimeFormat = time.RFC3339
)
// Formatter defines the formatting of events
type Formatter interface {
Format(ctx context.Context, e Event) ([]byte, error)
}
// DefaultFormatter is the default way in which to format events
var DefaultFormatter Formatter
func init() {
DefaultFormatter = NewTextFormatter()
}
// TextFormatter formats events as key value pairs.
// Any remaining text not wrapped in an instance of `F` will be
// placed at the end.
type TextFormatter struct {
TimeFormat string
}
// NewTextFormatter returns a Formatter that outputs as text.
func NewTextFormatter() Formatter {
return &TextFormatter{TimeFormat: DefaultTimeFormat}
}
// Format implements the Formatter interface
func (t *TextFormatter) Format(_ context.Context, e Event) ([]byte, error) {
var writer bytes.Buffer
writer.WriteString("time=\"")
writer.WriteString(e.Time.Format(t.TimeFormat))
writer.WriteString("\"")
keys := make([]string, len(e.Data))
i := 0
for k := range e.Data {
keys[i] = k
i++
}
for _, k := range keys {
v := e.Data[k]
writer.WriteByte(' ')
if shouldQuote(k) {
writer.WriteString(fmt.Sprintf("%q", k))
} else {
writer.WriteString(k)
}
writer.WriteByte('=')
switch v.(type) {
case string:
vs, _ := v.(string)
if shouldQuote(vs) {
fmt.Fprintf(&writer, "%q", vs)
} else {
writer.WriteString(vs)
}
case error:
tmperr, _ := v.(error)
es := tmperr.Error()
if shouldQuote(es) {
fmt.Fprintf(&writer, "%q", es)
} else {
writer.WriteString(es)
}
case time.Time:
tmptime, _ := v.(time.Time)
writer.WriteString(tmptime.Format(time.RFC3339))
default:
fmt.Fprint(&writer, v)
}
}
if len(e.Message) > 0 {
fmt.Fprintf(&writer, " _msg=%q", e.Message)
}
writer.WriteByte('\n')
return writer.Bytes(), nil
}
func shouldQuote(s string) bool {
for _, b := range s {
if !((b >= 'A' && b <= 'Z') ||
(b >= 'a' && b <= 'z') ||
(b >= '0' && b <= '9') ||
(b == '-' || b == '.' || b == '#' ||
b == '/' || b == '_')) {
return true
}
}
return false
}

180
vendor/github.com/Xe/ln/logger.go generated vendored Normal file
View File

@ -0,0 +1,180 @@
package ln
import (
"context"
"os"
"time"
"github.com/pkg/errors"
)
// Logger holds the current priority and list of filters
type Logger struct {
Filters []Filter
}
// DefaultLogger is the default implementation of Logger
var DefaultLogger *Logger
func init() {
var defaultFilters []Filter
// Default to STDOUT for logging, but allow LN_OUT to change it.
out := os.Stdout
if os.Getenv("LN_OUT") == "<stderr>" {
out = os.Stderr
}
defaultFilters = append(defaultFilters, NewWriterFilter(out, nil))
DefaultLogger = &Logger{
Filters: defaultFilters,
}
}
// F is a key-value mapping for structured data.
type F map[string]interface{}
// Extend concatentates one F with one or many Fer instances.
func (f F) Extend(other ...Fer) {
for _, ff := range other {
for k, v := range ff.F() {
f[k] = v
}
}
}
// F makes F an Fer
func (f F) F() F {
return f
}
// Fer allows any type to add fields to the structured logging key->value pairs.
type Fer interface {
F() F
}
// Event represents an event
type Event struct {
Time time.Time
Data F
Message string
}
// Log is the generic logging method.
func (l *Logger) Log(ctx context.Context, xs ...Fer) {
event := Event{Time: time.Now()}
addF := func(bf F) {
if event.Data == nil {
event.Data = bf
} else {
for k, v := range bf {
event.Data[k] = v
}
}
}
for _, f := range xs {
addF(f.F())
}
ctxf, ok := FFromContext(ctx)
if ok {
addF(ctxf)
}
if os.Getenv("LN_DEBUG_ALL_EVENTS") == "1" {
frame := callersFrame()
if event.Data == nil {
event.Data = make(F)
}
event.Data["_lineno"] = frame.lineno
event.Data["_function"] = frame.function
event.Data["_filename"] = frame.filename
}
l.filter(ctx, event)
}
func (l *Logger) filter(ctx context.Context, e Event) {
for _, f := range l.Filters {
if !f.Apply(ctx, e) {
return
}
}
}
// Error logs an error and information about the context of said error.
func (l *Logger) Error(ctx context.Context, err error, xs ...Fer) {
data := F{}
frame := callersFrame()
data["_lineno"] = frame.lineno
data["_function"] = frame.function
data["_filename"] = frame.filename
data["err"] = err
cause := errors.Cause(err)
if cause != nil {
data["cause"] = cause.Error()
}
xs = append(xs, data)
l.Log(ctx, xs...)
}
// Fatal logs this set of values, then exits with status code 1.
func (l *Logger) Fatal(ctx context.Context, xs ...Fer) {
xs = append(xs, F{"fatal": true})
l.Log(ctx, xs...)
os.Exit(1)
}
// FatalErr combines Fatal and Error.
func (l *Logger) FatalErr(ctx context.Context, err error, xs ...Fer) {
xs = append(xs, F{"fatal": true})
data := F{}
frame := callersFrame()
data["_lineno"] = frame.lineno
data["_function"] = frame.function
data["_filename"] = frame.filename
data["err"] = err
cause := errors.Cause(err)
if cause != nil {
data["cause"] = cause.Error()
}
xs = append(xs, data)
l.Log(ctx, xs...)
os.Exit(1)
}
// Default Implementation
// Log is the generic logging method.
func Log(ctx context.Context, xs ...Fer) {
DefaultLogger.Log(ctx, xs...)
}
// Error logs an error and information about the context of said error.
func Error(ctx context.Context, err error, xs ...Fer) {
DefaultLogger.Error(ctx, err, xs...)
}
// Fatal logs this set of values, then exits with status code 1.
func Fatal(ctx context.Context, xs ...Fer) {
DefaultLogger.Fatal(ctx, xs...)
}
// FatalErr combines Fatal and Error.
func FatalErr(ctx context.Context, err error, xs ...Fer) {
DefaultLogger.FatalErr(ctx, err, xs...)
}

111
vendor/github.com/Xe/ln/logger_test.go generated vendored Normal file
View File

@ -0,0 +1,111 @@
package ln
import (
"bytes"
"context"
"fmt"
"testing"
"time"
)
var ctx context.Context
func setup(t *testing.T) (*bytes.Buffer, func()) {
ctx = context.Background()
out := bytes.Buffer{}
oldFilters := DefaultLogger.Filters
DefaultLogger.Filters = []Filter{NewWriterFilter(&out, nil)}
return &out, func() {
DefaultLogger.Filters = oldFilters
}
}
func TestSimpleError(t *testing.T) {
out, teardown := setup(t)
defer teardown()
Log(ctx, F{"err": fmt.Errorf("This is an Error!!!")}, F{"msg": "fooey", "bar": "foo"})
data := []string{
`err="This is an Error!!!"`,
`fooey`,
`bar=foo`,
}
for _, line := range data {
if !bytes.Contains(out.Bytes(), []byte(line)) {
t.Fatalf("Bytes: %s not in %s", line, out.Bytes())
}
}
}
func TestTimeConversion(t *testing.T) {
out, teardown := setup(t)
defer teardown()
var zeroTime time.Time
Log(ctx, F{"zero": zeroTime})
data := []string{
`zero=0001-01-01T00:00:00Z`,
}
for _, line := range data {
if !bytes.Contains(out.Bytes(), []byte(line)) {
t.Fatalf("Bytes: %s not in %s", line, out.Bytes())
}
}
}
func TestDebug(t *testing.T) {
out, teardown := setup(t)
defer teardown()
// set priority to Debug
Error(ctx, fmt.Errorf("This is an Error!!!"), F{})
data := []string{
`err="This is an Error!!!"`,
`_lineno=`,
`_function=ln.TestDebug`,
`_filename=github.com/Xe/ln/logger_test.go`,
`cause="This is an Error!!!"`,
}
for _, line := range data {
if !bytes.Contains(out.Bytes(), []byte(line)) {
t.Fatalf("Bytes: %s not in %s", line, out.Bytes())
}
}
}
func TestFer(t *testing.T) {
out, teardown := setup(t)
defer teardown()
underTest := foobar{Foo: 1, Bar: "quux"}
Log(ctx, underTest)
data := []string{
`foo=1`,
`bar=quux`,
}
for _, line := range data {
if !bytes.Contains(out.Bytes(), []byte(line)) {
t.Fatalf("Bytes: %s not in %s", line, out.Bytes())
}
}
}
type foobar struct {
Foo int
Bar string
}
func (f foobar) F() F {
return F{
"foo": f.Foo,
"bar": f.Bar,
}
}

44
vendor/github.com/Xe/ln/stack.go generated vendored Normal file
View File

@ -0,0 +1,44 @@
package ln
import (
"os"
"runtime"
"strings"
)
type frame struct {
filename string
function string
lineno int
}
// skips 2 frames, since Caller returns the current frame, and we need
// the caller's caller.
func callersFrame() frame {
var out frame
pc, file, line, ok := runtime.Caller(3)
if !ok {
return out
}
srcLoc := strings.LastIndex(file, "/src/")
if srcLoc >= 0 {
file = file[srcLoc+5:]
}
out.filename = file
out.function = functionName(pc)
out.lineno = line
return out
}
func functionName(pc uintptr) string {
fn := runtime.FuncForPC(pc)
if fn == nil {
return "???"
}
name := fn.Name()
beg := strings.LastIndex(name, string(os.PathSeparator))
return name[beg+1:]
// end := strings.LastIndex(name, string(os.PathSeparator))
// return name[end+1 : len(name)]
}

2
vendor/github.com/fogleman/gg/.gitignore generated vendored Normal file
View File

@ -0,0 +1,2 @@
*.png

19
vendor/github.com/fogleman/gg/LICENSE.md generated vendored Normal file
View File

@ -0,0 +1,19 @@
Copyright (C) 2016 Michael Fogleman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

220
vendor/github.com/fogleman/gg/README.md generated vendored Normal file
View File

@ -0,0 +1,220 @@
# Go Graphics
`gg` is a library for rendering 2D graphics in pure Go.
![Stars](http://i.imgur.com/CylQIJt.png)
## Installation
go get github.com/fogleman/gg
## GoDoc
https://godoc.org/github.com/fogleman/gg
## Hello, Circle!
Look how easy!
```go
package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1000, 1000)
dc.DrawCircle(500, 500, 400)
dc.SetRGB(0, 0, 0)
dc.Fill()
dc.SavePNG("out.png")
}
```
## Examples
There are [lots of examples](https://github.com/fogleman/gg/tree/master/examples) included. They're mostly for testing the code, but they're good for learning, too.
![Examples](http://i.imgur.com/tMFoyzu.png)
## Creating Contexts
There are a few ways of creating a context.
```go
NewContext(width, height int) *Context
NewContextForImage(im image.Image) *Context
NewContextForRGBA(im *image.RGBA) *Context
```
## Drawing Functions
Ever used a graphics library that didn't have functions for drawing rectangles
or circles? What a pain!
```go
DrawPoint(x, y, r float64)
DrawLine(x1, y1, x2, y2 float64)
DrawRectangle(x, y, w, h float64)
DrawRoundedRectangle(x, y, w, h, r float64)
DrawCircle(x, y, r float64)
DrawArc(x, y, r, angle1, angle2 float64)
DrawEllipse(x, y, rx, ry float64)
DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64)
DrawRegularPolygon(n int, x, y, r, rotation float64)
DrawImage(im image.Image, x, y int)
DrawImageAnchored(im image.Image, x, y int, ax, ay float64)
SetPixel(x, y int)
MoveTo(x, y float64)
LineTo(x, y float64)
QuadraticTo(x1, y1, x2, y2 float64)
CubicTo(x1, y1, x2, y2, x3, y3 float64)
ClosePath()
ClearPath()
NewSubPath()
Clear()
Stroke()
Fill()
StrokePreserve()
FillPreserve()
```
It is often desired to center an image at a point. Use `DrawImageAnchored` with `ax` and `ay` set to 0.5 to do this. Use 0 to left or top align. Use 1 to right or bottom align. `DrawStringAnchored` does the same for text, so you don't need to call `MeasureString` yourself.
## Text Functions
It will even do word wrap for you!
```go
DrawString(s string, x, y float64)
DrawStringAnchored(s string, x, y, ax, ay float64)
DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align Align)
MeasureString(s string) (w, h float64)
WordWrap(s string, w float64) []string
SetFontFace(fontFace font.Face)
LoadFontFace(path string, points float64) error
```
## Color Functions
Colors can be set in several different ways for your convenience.
```go
SetRGB(r, g, b float64)
SetRGBA(r, g, b, a float64)
SetRGB255(r, g, b int)
SetRGBA255(r, g, b, a int)
SetColor(c color.Color)
SetHexColor(x string)
```
## Stroke & Fill Options
```go
SetLineWidth(lineWidth float64)
SetLineCap(lineCap LineCap)
SetLineJoin(lineJoin LineJoin)
SetDash(dashes ...float64)
SetFillRule(fillRule FillRule)
```
## Gradients & Patterns
`gg` supports linear and radial gradients and surface patterns. You can also implement your own patterns.
```go
SetFillStyle(pattern Pattern)
SetStrokeStyle(pattern Pattern)
NewSolidPattern(color color.Color)
NewLinearGradient(x0, y0, x1, y1 float64)
NewRadialGradient(x0, y0, r0, x1, y1, r1 float64)
NewSurfacePattern(im image.Image, op RepeatOp)
```
## Transformation Functions
```go
Identity()
Translate(x, y float64)
Scale(x, y float64)
Rotate(angle float64)
Shear(x, y float64)
ScaleAbout(sx, sy, x, y float64)
RotateAbout(angle, x, y float64)
ShearAbout(sx, sy, x, y float64)
TransformPoint(x, y float64) (tx, ty float64)
InvertY()
```
It is often desired to rotate or scale about a point that is not the origin. The functions `RotateAbout`, `ScaleAbout`, `ShearAbout` are provided as a convenience.
`InvertY` is provided in case Y should increase from bottom to top vs. the default top to bottom.
Note: transforms do not currently affect `DrawImage` or `DrawString`.
## Stack Functions
Save and restore the state of the context. These can be nested.
```go
Push()
Pop()
```
## Clipping Functions
Use clipping regions to restrict drawing operations to an area that you
defined using paths.
```go
Clip()
ClipPreserve()
ResetClip()
```
## Helper Functions
Sometimes you just don't want to write these yourself.
```go
Radians(degrees float64) float64
Degrees(radians float64) float64
LoadImage(path string) (image.Image, error)
LoadPNG(path string) (image.Image, error)
SavePNG(path string, im image.Image) error
```
![Separator](http://i.imgur.com/fsUvnPB.png)
## How Do it Do?
`gg` is mostly a wrapper around `github.com/golang/freetype/raster`. The goal
is to provide some more functionality and a nicer API that will suffice for
most use cases.
## Another Example
See the output of this example below.
```go
package main
import "github.com/fogleman/gg"
func main() {
const S = 1024
dc := gg.NewContext(S, S)
dc.SetRGBA(0, 0, 0, 0.1)
for i := 0; i < 360; i += 15 {
dc.Push()
dc.RotateAbout(gg.Radians(float64(i)), S/2, S/2)
dc.DrawEllipse(S/2, S/2, S*7/16, S/8)
dc.Fill()
dc.Pop()
}
dc.SavePNG("out.png")
}
```
![Ellipses](http://i.imgur.com/J9CBZef.png)

59
vendor/github.com/fogleman/gg/bezier.go generated vendored Normal file
View File

@ -0,0 +1,59 @@
package gg
import "math"
func quadratic(x0, y0, x1, y1, x2, y2, t float64) (x, y float64) {
u := 1 - t
a := u * u
b := 2 * u * t
c := t * t
x = a*x0 + b*x1 + c*x2
y = a*y0 + b*y1 + c*y2
return
}
func QuadraticBezier(x0, y0, x1, y1, x2, y2 float64) []Point {
l := (math.Hypot(x1-x0, y1-y0) +
math.Hypot(x2-x1, y2-y1))
n := int(l + 0.5)
if n < 4 {
n = 4
}
d := float64(n) - 1
result := make([]Point, n)
for i := 0; i < n; i++ {
t := float64(i) / d
x, y := quadratic(x0, y0, x1, y1, x2, y2, t)
result[i] = Point{x, y}
}
return result
}
func cubic(x0, y0, x1, y1, x2, y2, x3, y3, t float64) (x, y float64) {
u := 1 - t
a := u * u * u
b := 3 * u * u * t
c := 3 * u * t * t
d := t * t * t
x = a*x0 + b*x1 + c*x2 + d*x3
y = a*y0 + b*y1 + c*y2 + d*y3
return
}
func CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3 float64) []Point {
l := (math.Hypot(x1-x0, y1-y0) +
math.Hypot(x2-x1, y2-y1) +
math.Hypot(x3-x2, y3-y2))
n := int(l + 0.5)
if n < 4 {
n = 4
}
d := float64(n) - 1
result := make([]Point, n)
for i := 0; i < n; i++ {
t := float64(i) / d
x, y := cubic(x0, y0, x1, y1, x2, y2, x3, y3, t)
result[i] = Point{x, y}
}
return result
}

768
vendor/github.com/fogleman/gg/context.go generated vendored Normal file
View File

@ -0,0 +1,768 @@
// Package gg provides a simple API for rendering 2D graphics in pure Go.
package gg
import (
"image"
"image/color"
"image/draw"
"image/png"
"io"
"math"
"github.com/golang/freetype/raster"
"golang.org/x/image/font"
"golang.org/x/image/font/basicfont"
)
type LineCap int
const (
LineCapRound LineCap = iota
LineCapButt
LineCapSquare
)
type LineJoin int
const (
LineJoinRound LineJoin = iota
LineJoinBevel
)
type FillRule int
const (
FillRuleWinding FillRule = iota
FillRuleEvenOdd
)
type Align int
const (
AlignLeft Align = iota
AlignCenter
AlignRight
)
var (
defaultFillStyle = NewSolidPattern(color.White)
defaultStrokeStyle = NewSolidPattern(color.Black)
)
type Context struct {
width int
height int
im *image.RGBA
mask *image.Alpha
color color.Color
fillPattern Pattern
strokePattern Pattern
strokePath raster.Path
fillPath raster.Path
start Point
current Point
hasCurrent bool
dashes []float64
lineWidth float64
lineCap LineCap
lineJoin LineJoin
fillRule FillRule
fontFace font.Face
fontHeight float64
matrix Matrix
stack []*Context
}
// NewContext creates a new image.RGBA with the specified width and height
// and prepares a context for rendering onto that image.
func NewContext(width, height int) *Context {
return NewContextForRGBA(image.NewRGBA(image.Rect(0, 0, width, height)))
}
// NewContextForImage copies the specified image into a new image.RGBA
// and prepares a context for rendering onto that image.
func NewContextForImage(im image.Image) *Context {
return NewContextForRGBA(imageToRGBA(im))
}
// NewContextForRGBA prepares a context for rendering onto the specified image.
// No copy is made.
func NewContextForRGBA(im *image.RGBA) *Context {
return &Context{
width: im.Bounds().Size().X,
height: im.Bounds().Size().Y,
im: im,
color: color.Transparent,
fillPattern: defaultFillStyle,
strokePattern: defaultStrokeStyle,
lineWidth: 1,
fillRule: FillRuleWinding,
fontFace: basicfont.Face7x13,
fontHeight: 13,
matrix: Identity(),
}
}
// Image returns the image that has been drawn by this context.
func (dc *Context) Image() image.Image {
return dc.im
}
// Width returns the width of the image in pixels.
func (dc *Context) Width() int {
return dc.width
}
// Height returns the height of the image in pixels.
func (dc *Context) Height() int {
return dc.height
}
// SavePNG encodes the image as a PNG and writes it to disk.
func (dc *Context) SavePNG(path string) error {
return SavePNG(path, dc.im)
}
// EncodePNG encodes the image as a PNG and writes it to the provided io.Writer.
func (dc *Context) EncodePNG(w io.Writer) error {
return png.Encode(w, dc.im)
}
// SetDash sets the current dash pattern to use. Call with zero arguments to
// disable dashes. The values specify the lengths of each dash, with
// alternating on and off lengths.
func (dc *Context) SetDash(dashes ...float64) {
dc.dashes = dashes
}
func (dc *Context) SetLineWidth(lineWidth float64) {
dc.lineWidth = lineWidth
}
func (dc *Context) SetLineCap(lineCap LineCap) {
dc.lineCap = lineCap
}
func (dc *Context) SetLineCapRound() {
dc.lineCap = LineCapRound
}
func (dc *Context) SetLineCapButt() {
dc.lineCap = LineCapButt
}
func (dc *Context) SetLineCapSquare() {
dc.lineCap = LineCapSquare
}
func (dc *Context) SetLineJoin(lineJoin LineJoin) {
dc.lineJoin = lineJoin
}
func (dc *Context) SetLineJoinRound() {
dc.lineJoin = LineJoinRound
}
func (dc *Context) SetLineJoinBevel() {
dc.lineJoin = LineJoinBevel
}
func (dc *Context) SetFillRule(fillRule FillRule) {
dc.fillRule = fillRule
}
func (dc *Context) SetFillRuleWinding() {
dc.fillRule = FillRuleWinding
}
func (dc *Context) SetFillRuleEvenOdd() {
dc.fillRule = FillRuleEvenOdd
}
// Color Setters
func (dc *Context) setFillAndStrokeColor(c color.Color) {
dc.color = c
dc.fillPattern = NewSolidPattern(c)
dc.strokePattern = NewSolidPattern(c)
}
// SetFillStyle sets current fill style
func (dc *Context) SetFillStyle(pattern Pattern) {
// if pattern is SolidPattern, also change dc.color(for dc.Clear, dc.drawString)
if fillStyle, ok := pattern.(*solidPattern); ok {
dc.color = fillStyle.color
}
dc.fillPattern = pattern
}
// SetStrokeStyle sets current stroke style
func (dc *Context) SetStrokeStyle(pattern Pattern) {
dc.strokePattern = pattern
}
// SetColor sets the current color(for both fill and stroke).
func (dc *Context) SetColor(c color.Color) {
dc.setFillAndStrokeColor(c)
}
// SetHexColor sets the current color using a hex string. The leading pound
// sign (#) is optional. Both 3- and 6-digit variations are supported. 8 digits
// may be provided to set the alpha value as well.
func (dc *Context) SetHexColor(x string) {
r, g, b, a := parseHexColor(x)
dc.SetRGBA255(r, g, b, a)
}
// SetRGBA255 sets the current color. r, g, b, a values should be between 0 and
// 255, inclusive.
func (dc *Context) SetRGBA255(r, g, b, a int) {
dc.color = color.NRGBA{uint8(r), uint8(g), uint8(b), uint8(a)}
dc.setFillAndStrokeColor(dc.color)
}
// SetRGB255 sets the current color. r, g, b values should be between 0 and 255,
// inclusive. Alpha will be set to 255 (fully opaque).
func (dc *Context) SetRGB255(r, g, b int) {
dc.SetRGBA255(r, g, b, 255)
}
// SetRGBA sets the current color. r, g, b, a values should be between 0 and 1,
// inclusive.
func (dc *Context) SetRGBA(r, g, b, a float64) {
dc.color = color.NRGBA{
uint8(r * 255),
uint8(g * 255),
uint8(b * 255),
uint8(a * 255),
}
dc.setFillAndStrokeColor(dc.color)
}
// SetRGB sets the current color. r, g, b values should be between 0 and 1,
// inclusive. Alpha will be set to 1 (fully opaque).
func (dc *Context) SetRGB(r, g, b float64) {
dc.SetRGBA(r, g, b, 1)
}
// Path Manipulation
// MoveTo starts a new subpath within the current path starting at the
// specified point.
func (dc *Context) MoveTo(x, y float64) {
if dc.hasCurrent {
dc.fillPath.Add1(dc.start.Fixed())
}
x, y = dc.TransformPoint(x, y)
p := Point{x, y}
dc.strokePath.Start(p.Fixed())
dc.fillPath.Start(p.Fixed())
dc.start = p
dc.current = p
dc.hasCurrent = true
}
// LineTo adds a line segment to the current path starting at the current
// point. If there is no current point, it is equivalent to MoveTo(x, y)
func (dc *Context) LineTo(x, y float64) {
if !dc.hasCurrent {
dc.MoveTo(x, y)
} else {
x, y = dc.TransformPoint(x, y)
p := Point{x, y}
dc.strokePath.Add1(p.Fixed())
dc.fillPath.Add1(p.Fixed())
dc.current = p
}
}
// QuadraticTo adds a quadratic bezier curve to the current path starting at
// the current point. If there is no current point, it first performs
// MoveTo(x1, y1)
func (dc *Context) QuadraticTo(x1, y1, x2, y2 float64) {
if !dc.hasCurrent {
dc.MoveTo(x1, y1)
}
x1, y1 = dc.TransformPoint(x1, y1)
x2, y2 = dc.TransformPoint(x2, y2)
p1 := Point{x1, y1}
p2 := Point{x2, y2}
dc.strokePath.Add2(p1.Fixed(), p2.Fixed())
dc.fillPath.Add2(p1.Fixed(), p2.Fixed())
dc.current = p2
}
// CubicTo adds a cubic bezier curve to the current path starting at the
// current point. If there is no current point, it first performs
// MoveTo(x1, y1). Because freetype/raster does not support cubic beziers,
// this is emulated with many small line segments.
func (dc *Context) CubicTo(x1, y1, x2, y2, x3, y3 float64) {
if !dc.hasCurrent {
dc.MoveTo(x1, y1)
}
x0, y0 := dc.current.X, dc.current.Y
x1, y1 = dc.TransformPoint(x1, y1)
x2, y2 = dc.TransformPoint(x2, y2)
x3, y3 = dc.TransformPoint(x3, y3)
points := CubicBezier(x0, y0, x1, y1, x2, y2, x3, y3)
previous := dc.current.Fixed()
for _, p := range points[1:] {
f := p.Fixed()
if f == previous {
// TODO: this fixes some rendering issues but not all
continue
}
previous = f
dc.strokePath.Add1(f)
dc.fillPath.Add1(f)
dc.current = p
}
}
// ClosePath adds a line segment from the current point to the beginning
// of the current subpath. If there is no current point, this is a no-op.
func (dc *Context) ClosePath() {
if dc.hasCurrent {
dc.strokePath.Add1(dc.start.Fixed())
dc.fillPath.Add1(dc.start.Fixed())
dc.current = dc.start
}
}
// ClearPath clears the current path. There is no current point after this
// operation.
func (dc *Context) ClearPath() {
dc.strokePath.Clear()
dc.fillPath.Clear()
dc.hasCurrent = false
}
// NewSubPath starts a new subpath within the current path. There is no current
// point after this operation.
func (dc *Context) NewSubPath() {
if dc.hasCurrent {
dc.fillPath.Add1(dc.start.Fixed())
}
dc.hasCurrent = false
}
// Path Drawing
func (dc *Context) capper() raster.Capper {
switch dc.lineCap {
case LineCapButt:
return raster.ButtCapper
case LineCapRound:
return raster.RoundCapper
case LineCapSquare:
return raster.SquareCapper
}
return nil
}
func (dc *Context) joiner() raster.Joiner {
switch dc.lineJoin {
case LineJoinBevel:
return raster.BevelJoiner
case LineJoinRound:
return raster.RoundJoiner
}
return nil
}
func (dc *Context) stroke(painter raster.Painter) {
path := dc.strokePath
if len(dc.dashes) > 0 {
path = dashed(path, dc.dashes)
} else {
// TODO: this is a temporary workaround to remove tiny segments
// that result in rendering issues
path = rasterPath(flattenPath(path))
}
r := raster.NewRasterizer(dc.width, dc.height)
r.UseNonZeroWinding = true
r.AddStroke(path, fix(dc.lineWidth), dc.capper(), dc.joiner())
r.Rasterize(painter)
}
func (dc *Context) fill(painter raster.Painter) {
path := dc.fillPath
if dc.hasCurrent {
path = make(raster.Path, len(dc.fillPath))
copy(path, dc.fillPath)
path.Add1(dc.start.Fixed())
}
r := raster.NewRasterizer(dc.width, dc.height)
r.UseNonZeroWinding = dc.fillRule == FillRuleWinding
r.AddPath(path)
r.Rasterize(painter)
}
// StrokePreserve strokes the current path with the current color, line width,
// line cap, line join and dash settings. The path is preserved after this
// operation.
func (dc *Context) StrokePreserve() {
painter := newPatternPainter(dc.im, dc.mask, dc.strokePattern)
dc.stroke(painter)
}
// Stroke strokes the current path with the current color, line width,
// line cap, line join and dash settings. The path is cleared after this
// operation.
func (dc *Context) Stroke() {
dc.StrokePreserve()
dc.ClearPath()
}
// FillPreserve fills the current path with the current color. Open subpaths
// are implicity closed. The path is preserved after this operation.
func (dc *Context) FillPreserve() {
painter := newPatternPainter(dc.im, dc.mask, dc.fillPattern)
dc.fill(painter)
}
// Fill fills the current path with the current color. Open subpaths
// are implicity closed. The path is cleared after this operation.
func (dc *Context) Fill() {
dc.FillPreserve()
dc.ClearPath()
}
// ClipPreserve updates the clipping region by intersecting the current
// clipping region with the current path as it would be filled by dc.Fill().
// The path is preserved after this operation.
func (dc *Context) ClipPreserve() {
clip := image.NewAlpha(image.Rect(0, 0, dc.width, dc.height))
painter := raster.NewAlphaOverPainter(clip)
dc.fill(painter)
if dc.mask == nil {
dc.mask = clip
} else {
mask := image.NewAlpha(image.Rect(0, 0, dc.width, dc.height))
draw.DrawMask(mask, mask.Bounds(), clip, image.ZP, dc.mask, image.ZP, draw.Over)
dc.mask = mask
}
}
// Clip updates the clipping region by intersecting the current
// clipping region with the current path as it would be filled by dc.Fill().
// The path is cleared after this operation.
func (dc *Context) Clip() {
dc.ClipPreserve()
dc.ClearPath()
}
// ResetClip clears the clipping region.
func (dc *Context) ResetClip() {
dc.mask = nil
}
// Convenient Drawing Functions
// Clear fills the entire image with the current color.
func (dc *Context) Clear() {
src := image.NewUniform(dc.color)
draw.Draw(dc.im, dc.im.Bounds(), src, image.ZP, draw.Src)
}
// SetPixel sets the color of the specified pixel using the current color.
func (dc *Context) SetPixel(x, y int) {
dc.im.Set(x, y, dc.color)
}
// DrawPoint is like DrawCircle but ensures that a circle of the specified
// size is drawn regardless of the current transformation matrix. The position
// is still transformed, but not the shape of the point.
func (dc *Context) DrawPoint(x, y, r float64) {
dc.Push()
tx, ty := dc.TransformPoint(x, y)
dc.Identity()
dc.DrawCircle(tx, ty, r)
dc.Pop()
}
func (dc *Context) DrawLine(x1, y1, x2, y2 float64) {
dc.MoveTo(x1, y1)
dc.LineTo(x2, y2)
}
func (dc *Context) DrawRectangle(x, y, w, h float64) {
dc.NewSubPath()
dc.MoveTo(x, y)
dc.LineTo(x+w, y)
dc.LineTo(x+w, y+h)
dc.LineTo(x, y+h)
dc.ClosePath()
}
func (dc *Context) DrawRoundedRectangle(x, y, w, h, r float64) {
x0, x1, x2, x3 := x, x+r, x+w-r, x+w
y0, y1, y2, y3 := y, y+r, y+h-r, y+h
dc.NewSubPath()
dc.MoveTo(x1, y0)
dc.LineTo(x2, y0)
dc.DrawArc(x2, y1, r, Radians(270), Radians(360))
dc.LineTo(x3, y2)
dc.DrawArc(x2, y2, r, Radians(0), Radians(90))
dc.LineTo(x1, y3)
dc.DrawArc(x1, y2, r, Radians(90), Radians(180))
dc.LineTo(x0, y1)
dc.DrawArc(x1, y1, r, Radians(180), Radians(270))
dc.ClosePath()
}
func (dc *Context) DrawEllipticalArc(x, y, rx, ry, angle1, angle2 float64) {
const n = 16
for i := 0; i < n; i++ {
p1 := float64(i+0) / n
p2 := float64(i+1) / n
a1 := angle1 + (angle2-angle1)*p1
a2 := angle1 + (angle2-angle1)*p2
x0 := x + rx*math.Cos(a1)
y0 := y + ry*math.Sin(a1)
x1 := x + rx*math.Cos(a1+(a2-a1)/2)
y1 := y + ry*math.Sin(a1+(a2-a1)/2)
x2 := x + rx*math.Cos(a2)
y2 := y + ry*math.Sin(a2)
cx := 2*x1 - x0/2 - x2/2
cy := 2*y1 - y0/2 - y2/2
if i == 0 && !dc.hasCurrent {
dc.MoveTo(x0, y0)
}
dc.QuadraticTo(cx, cy, x2, y2)
}
}
func (dc *Context) DrawEllipse(x, y, rx, ry float64) {
dc.NewSubPath()
dc.DrawEllipticalArc(x, y, rx, ry, 0, 2*math.Pi)
dc.ClosePath()
}
func (dc *Context) DrawArc(x, y, r, angle1, angle2 float64) {
dc.DrawEllipticalArc(x, y, r, r, angle1, angle2)
}
func (dc *Context) DrawCircle(x, y, r float64) {
dc.NewSubPath()
dc.DrawEllipticalArc(x, y, r, r, 0, 2*math.Pi)
dc.ClosePath()
}
func (dc *Context) DrawRegularPolygon(n int, x, y, r, rotation float64) {
angle := 2 * math.Pi / float64(n)
rotation -= math.Pi / 2
if n%2 == 0 {
rotation += angle / 2
}
dc.NewSubPath()
for i := 0; i < n; i++ {
a := rotation + angle*float64(i)
dc.LineTo(x+r*math.Cos(a), y+r*math.Sin(a))
}
dc.ClosePath()
}
// DrawImage draws the specified image at the specified point.
// Currently, rotation and scaling transforms are not supported.
func (dc *Context) DrawImage(im image.Image, x, y int) {
dc.DrawImageAnchored(im, x, y, 0, 0)
}
// DrawImageAnchored draws the specified image at the specified anchor point.
// The anchor point is x - w * ax, y - h * ay, where w, h is the size of the
// image. Use ax=0.5, ay=0.5 to center the image at the specified point.
func (dc *Context) DrawImageAnchored(im image.Image, x, y int, ax, ay float64) {
s := im.Bounds().Size()
x -= int(ax * float64(s.X))
y -= int(ay * float64(s.Y))
p := image.Pt(x, y)
r := image.Rectangle{p, p.Add(s)}
if dc.mask == nil {
draw.Draw(dc.im, r, im, image.ZP, draw.Over)
} else {
draw.DrawMask(dc.im, r, im, image.ZP, dc.mask, p, draw.Over)
}
}
// Text Functions
func (dc *Context) SetFontFace(fontFace font.Face) {
dc.fontFace = fontFace
dc.fontHeight = float64(fontFace.Metrics().Height) / 64
}
func (dc *Context) LoadFontFace(path string, points float64) error {
face, err := LoadFontFace(path, points)
if err == nil {
dc.fontFace = face
dc.fontHeight = points * 72 / 96
}
return err
}
func (dc *Context) drawString(im *image.RGBA, s string, x, y float64) {
d := &font.Drawer{
Dst: im,
Src: image.NewUniform(dc.color),
Face: dc.fontFace,
Dot: fixp(x, y),
}
d.DrawString(s)
}
// DrawString draws the specified text at the specified point.
// Currently, rotation and scaling transforms are not supported.
func (dc *Context) DrawString(s string, x, y float64) {
dc.DrawStringAnchored(s, x, y, 0, 0)
}
// DrawStringAnchored draws the specified text at the specified anchor point.
// The anchor point is x - w * ax, y - h * ay, where w, h is the size of the
// text. Use ax=0.5, ay=0.5 to center the text at the specified point.
func (dc *Context) DrawStringAnchored(s string, x, y, ax, ay float64) {
w, h := dc.MeasureString(s)
x, y = dc.TransformPoint(x, y)
x -= ax * w
y += ay * h
if dc.mask == nil {
dc.drawString(dc.im, s, x, y)
} else {
im := image.NewRGBA(image.Rect(0, 0, dc.width, dc.height))
dc.drawString(im, s, x, y)
draw.DrawMask(dc.im, dc.im.Bounds(), im, image.ZP, dc.mask, image.ZP, draw.Over)
}
}
// DrawStringWrapped word-wraps the specified string to the given max width
// and then draws it at the specified anchor point using the given line
// spacing and text alignment.
func (dc *Context) DrawStringWrapped(s string, x, y, ax, ay, width, lineSpacing float64, align Align) {
lines := dc.WordWrap(s, width)
h := float64(len(lines)) * dc.fontHeight * lineSpacing
h -= (lineSpacing - 1) * dc.fontHeight
x -= ax * width
y -= ay * h
switch align {
case AlignLeft:
ax = 0
case AlignCenter:
ax = 0.5
x += width / 2
case AlignRight:
ax = 1
x += width
}
ay = 1
for _, line := range lines {
dc.DrawStringAnchored(line, x, y, ax, ay)
y += dc.fontHeight * lineSpacing
}
}
// MeasureString returns the rendered width and height of the specified text
// given the current font face.
func (dc *Context) MeasureString(s string) (w, h float64) {
d := &font.Drawer{
Face: dc.fontFace,
}
a := d.MeasureString(s)
return float64(a >> 6), dc.fontHeight
}
// WordWrap wraps the specified string to the given max width and current
// font face.
func (dc *Context) WordWrap(s string, w float64) []string {
return wordWrap(dc, s, w)
}
// Transformation Matrix Operations
// Identity resets the current transformation matrix to the identity matrix.
// This results in no translating, scaling, rotating, or shearing.
func (dc *Context) Identity() {
dc.matrix = Identity()
}
// Translate updates the current matrix with a translation.
func (dc *Context) Translate(x, y float64) {
dc.matrix = dc.matrix.Translate(x, y)
}
// Scale updates the current matrix with a scaling factor.
// Scaling occurs about the origin.
func (dc *Context) Scale(x, y float64) {
dc.matrix = dc.matrix.Scale(x, y)
}
// ScaleAbout updates the current matrix with a scaling factor.
// Scaling occurs about the specified point.
func (dc *Context) ScaleAbout(sx, sy, x, y float64) {
dc.Translate(x, y)
dc.Scale(sx, sy)
dc.Translate(-x, -y)
}
// Rotate updates the current matrix with a clockwise rotation.
// Rotation occurs about the origin. Angle is specified in radians.
func (dc *Context) Rotate(angle float64) {
dc.matrix = dc.matrix.Rotate(angle)
}
// RotateAbout updates the current matrix with a clockwise rotation.
// Rotation occurs about the specified point. Angle is specified in radians.
func (dc *Context) RotateAbout(angle, x, y float64) {
dc.Translate(x, y)
dc.Rotate(angle)
dc.Translate(-x, -y)
}
// Shear updates the current matrix with a shearing angle.
// Shearing occurs about the origin.
func (dc *Context) Shear(x, y float64) {
dc.matrix = dc.matrix.Shear(x, y)
}
// ShearAbout updates the current matrix with a shearing angle.
// Shearing occurs about the specified point.
func (dc *Context) ShearAbout(sx, sy, x, y float64) {
dc.Translate(x, y)
dc.Shear(sx, sy)
dc.Translate(-x, -y)
}
// TransformPoint multiplies the specified point by the current matrix,
// returning a transformed position.
func (dc *Context) TransformPoint(x, y float64) (tx, ty float64) {
return dc.matrix.TransformPoint(x, y)
}
// InvertY flips the Y axis so that Y grows from bottom to top and Y=0 is at
// the bottom of the image.
func (dc *Context) InvertY() {
dc.Translate(0, float64(dc.height))
dc.Scale(1, -1)
}
// Stack
// Push saves the current state of the context for later retrieval. These
// can be nested.
func (dc *Context) Push() {
x := *dc
dc.stack = append(dc.stack, &x)
}
// Pop restores the last saved context state from the stack.
func (dc *Context) Pop() {
before := *dc
s := dc.stack
x, s := s[len(s)-1], s[:len(s)-1]
*dc = *x
dc.mask = before.mask
dc.strokePath = before.strokePath
dc.fillPath = before.fillPath
dc.start = before.start
dc.current = before.current
dc.hasCurrent = before.hasCurrent
}

84
vendor/github.com/fogleman/gg/examples/beziers.go generated vendored Normal file
View File

@ -0,0 +1,84 @@
package main
import (
"math/rand"
"github.com/fogleman/gg"
)
func random() float64 {
return rand.Float64()*2 - 1
}
func point() (x, y float64) {
return random(), random()
}
func drawCurve(dc *gg.Context) {
dc.SetRGBA(0, 0, 0, 0.1)
dc.FillPreserve()
dc.SetRGB(0, 0, 0)
dc.SetLineWidth(12)
dc.Stroke()
}
func drawPoints(dc *gg.Context) {
dc.SetRGBA(1, 0, 0, 0.5)
dc.SetLineWidth(2)
dc.Stroke()
}
func randomQuadratic(dc *gg.Context) {
x0, y0 := point()
x1, y1 := point()
x2, y2 := point()
dc.MoveTo(x0, y0)
dc.QuadraticTo(x1, y1, x2, y2)
drawCurve(dc)
dc.MoveTo(x0, y0)
dc.LineTo(x1, y1)
dc.LineTo(x2, y2)
drawPoints(dc)
}
func randomCubic(dc *gg.Context) {
x0, y0 := point()
x1, y1 := point()
x2, y2 := point()
x3, y3 := point()
dc.MoveTo(x0, y0)
dc.CubicTo(x1, y1, x2, y2, x3, y3)
drawCurve(dc)
dc.MoveTo(x0, y0)
dc.LineTo(x1, y1)
dc.LineTo(x2, y2)
dc.LineTo(x3, y3)
drawPoints(dc)
}
func main() {
const (
S = 256
W = 8
H = 8
)
dc := gg.NewContext(S*W, S*H)
dc.SetRGB(1, 1, 1)
dc.Clear()
for j := 0; j < H; j++ {
for i := 0; i < W; i++ {
x := float64(i)*S + S/2
y := float64(j)*S + S/2
dc.Push()
dc.Translate(x, y)
dc.Scale(S/2, S/2)
if j%2 == 0 {
randomCubic(dc)
} else {
randomQuadratic(dc)
}
dc.Pop()
}
}
dc.SavePNG("out.png")
}

11
vendor/github.com/fogleman/gg/examples/circle.go generated vendored Normal file
View File

@ -0,0 +1,11 @@
package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1000, 1000)
dc.DrawCircle(500, 500, 400)
dc.SetRGB(0, 0, 0)
dc.Fill()
dc.SavePNG("out.png")
}

15
vendor/github.com/fogleman/gg/examples/clip.go generated vendored Normal file
View File

@ -0,0 +1,15 @@
package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1000, 1000)
dc.DrawCircle(350, 500, 300)
dc.Clip()
dc.DrawCircle(650, 500, 300)
dc.Clip()
dc.DrawRectangle(0, 0, 1000, 1000)
dc.SetRGB(0, 0, 0)
dc.Fill()
dc.SavePNG("out.png")
}

38
vendor/github.com/fogleman/gg/examples/cubic.go generated vendored Normal file
View File

@ -0,0 +1,38 @@
package main
import "github.com/fogleman/gg"
func main() {
const S = 1000
dc := gg.NewContext(S, S)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.Translate(S/2, S/2)
dc.Scale(40, 40)
var x0, y0, x1, y1, x2, y2, x3, y3 float64
x0, y0 = -10, 0
x1, y1 = -8, -8
x2, y2 = 8, 8
x3, y3 = 10, 0
dc.MoveTo(x0, y0)
dc.CubicTo(x1, y1, x2, y2, x3, y3)
dc.SetRGBA(0, 0, 0, 0.2)
dc.SetLineWidth(8)
dc.FillPreserve()
dc.SetRGB(0, 0, 0)
dc.SetDash(16, 24)
dc.Stroke()
dc.MoveTo(x0, y0)
dc.LineTo(x1, y1)
dc.LineTo(x2, y2)
dc.LineTo(x3, y3)
dc.SetRGBA(1, 0, 0, 0.4)
dc.SetLineWidth(2)
dc.SetDash(4, 8, 1, 8)
dc.Stroke()
dc.SavePNG("out.png")
}

20
vendor/github.com/fogleman/gg/examples/ellipse.go generated vendored Normal file
View File

@ -0,0 +1,20 @@
package main
import "github.com/fogleman/gg"
func main() {
const S = 1024
dc := gg.NewContext(S, S)
dc.SetRGBA(0, 0, 0, 0.1)
for i := 0; i < 360; i += 15 {
dc.Push()
dc.RotateAbout(gg.Radians(float64(i)), S/2, S/2)
dc.DrawEllipse(S/2, S/2, S*7/16, S/8)
dc.Fill()
dc.Pop()
}
if im, err := gg.LoadImage("examples/gopher.png"); err == nil {
dc.DrawImageAnchored(im, S/2, S/2, 0.5, 0.5)
}
dc.SavePNG("out.png")
}

View File

@ -0,0 +1,39 @@
package main
import (
"image/color"
"github.com/fogleman/gg"
)
func main() {
dc := gg.NewContext(500, 400)
grad := gg.NewLinearGradient(20, 320, 400, 20)
grad.AddColorStop(0, color.RGBA{0, 255, 0, 255})
grad.AddColorStop(1, color.RGBA{0, 0, 255, 255})
grad.AddColorStop(0.5, color.RGBA{255, 0, 0, 255})
dc.SetColor(color.White)
dc.DrawRectangle(20, 20, 400-20, 300)
dc.Stroke()
dc.SetStrokeStyle(grad)
dc.SetLineWidth(4)
dc.MoveTo(10, 10)
dc.LineTo(410, 10)
dc.LineTo(410, 100)
dc.LineTo(10, 100)
dc.ClosePath()
dc.Stroke()
dc.SetFillStyle(grad)
dc.MoveTo(10, 120)
dc.LineTo(410, 120)
dc.LineTo(410, 300)
dc.LineTo(10, 300)
dc.ClosePath()
dc.Fill()
dc.SavePNG("out.png")
}

View File

@ -0,0 +1,27 @@
package main
import (
"image/color"
"github.com/fogleman/gg"
)
func main() {
dc := gg.NewContext(400, 200)
grad := gg.NewRadialGradient(100, 100, 10, 100, 120, 80)
grad.AddColorStop(0, color.RGBA{0, 255, 0, 255})
grad.AddColorStop(1, color.RGBA{0, 0, 255, 255})
dc.SetFillStyle(grad)
dc.DrawRectangle(0, 0, 200, 200)
dc.Fill()
dc.SetColor(color.White)
dc.DrawCircle(100, 100, 10)
dc.Stroke()
dc.DrawCircle(100, 120, 80)
dc.Stroke()
dc.SavePNG("out.png")
}

31
vendor/github.com/fogleman/gg/examples/lines.go generated vendored Normal file
View File

@ -0,0 +1,31 @@
package main
import (
"math/rand"
"github.com/fogleman/gg"
)
func main() {
const W = 1024
const H = 1024
dc := gg.NewContext(W, H)
dc.SetRGB(0, 0, 0)
dc.Clear()
for i := 0; i < 1000; i++ {
x1 := rand.Float64() * W
y1 := rand.Float64() * H
x2 := rand.Float64() * W
y2 := rand.Float64() * H
r := rand.Float64()
g := rand.Float64()
b := rand.Float64()
a := rand.Float64()*0.5 + 0.5
w := rand.Float64()*4 + 1
dc.SetRGBA(r, g, b, a)
dc.SetLineWidth(w)
dc.DrawLine(x1, y1, x2, y2)
dc.Stroke()
}
dc.SavePNG("out.png")
}

19
vendor/github.com/fogleman/gg/examples/linewidth.go generated vendored Normal file
View File

@ -0,0 +1,19 @@
package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1000, 1000)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.SetRGB(0, 0, 0)
w := 0.1
for i := 100; i <= 900; i += 20 {
x := float64(i)
dc.DrawLine(x+50, 0, x-50, 1000)
dc.SetLineWidth(w)
dc.Stroke()
w += 0.1
}
dc.SavePNG("out.png")
}

28
vendor/github.com/fogleman/gg/examples/lorem.go generated vendored Normal file
View File

@ -0,0 +1,28 @@
package main
import "github.com/fogleman/gg"
var lines = []string{
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod",
"tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,",
"quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo",
"consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse",
"cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat",
"non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
}
func main() {
const W = 800
const H = 400
dc := gg.NewContext(W, H)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.SetRGB(0, 0, 0)
// dc.LoadFontFace("/Library/Fonts/Arial.ttf", 18)
const h = 24
for i, line := range lines {
y := H/2 - h*len(lines)/2 + i*h
dc.DrawStringAnchored(line, 400, float64(y), 0.5, 0.5)
}
dc.SavePNG("out.png")
}

20
vendor/github.com/fogleman/gg/examples/mask.go generated vendored Normal file
View File

@ -0,0 +1,20 @@
package main
import (
"log"
"github.com/fogleman/gg"
)
func main() {
im, err := gg.LoadImage("examples/lenna.png")
if err != nil {
log.Fatal(err)
}
dc := gg.NewContext(512, 512)
dc.DrawRoundedRectangle(0, 0, 512, 512, 64)
dc.Clip()
dc.DrawImage(im, 0, 0)
dc.SavePNG("out.png")
}

30
vendor/github.com/fogleman/gg/examples/meme.go generated vendored Normal file
View File

@ -0,0 +1,30 @@
package main
import "github.com/fogleman/gg"
func main() {
const S = 1024
dc := gg.NewContext(S, S)
dc.SetRGB(1, 1, 1)
dc.Clear()
if err := dc.LoadFontFace("/Library/Fonts/Impact.ttf", 96); err != nil {
panic(err)
}
dc.SetRGB(0, 0, 0)
s := "ONE DOES NOT SIMPLY"
n := 6 // "stroke" size
for dy := -n; dy <= n; dy++ {
for dx := -n; dx <= n; dx++ {
if dx*dx+dy*dy >= n*n {
// give it rounded corners
continue
}
x := S/2 + float64(dx)
y := S/2 + float64(dy)
dc.DrawStringAnchored(s, x, y, 0.5, 0.5)
}
}
dc.SetRGB(1, 1, 1)
dc.DrawStringAnchored(s, S/2, S/2, 0.5, 0.5)
dc.SavePNG("out.png")
}

31
vendor/github.com/fogleman/gg/examples/openfill.go generated vendored Normal file
View File

@ -0,0 +1,31 @@
package main
import (
"math"
"math/rand"
"github.com/fogleman/gg"
)
func main() {
dc := gg.NewContext(1000, 1000)
for j := 0; j < 10; j++ {
for i := 0; i < 10; i++ {
x := float64(i)*100 + 50
y := float64(j)*100 + 50
a1 := rand.Float64() * 2 * math.Pi
a2 := a1 + rand.Float64()*math.Pi + math.Pi/2
dc.DrawArc(x, y, 40, a1, a2)
// dc.ClosePath()
}
}
dc.SetRGB(0, 0, 0)
dc.FillPreserve()
dc.SetRGB(1, 1, 1)
dc.SetLineWidth(8)
dc.StrokePreserve()
dc.SetRGB(1, 0, 0)
dc.SetLineWidth(4)
dc.StrokePreserve()
dc.SavePNG("out.png")
}

20
vendor/github.com/fogleman/gg/examples/pattern-fill.go generated vendored Normal file
View File

@ -0,0 +1,20 @@
package main
import "github.com/fogleman/gg"
func main() {
im, err := gg.LoadPNG("examples/lenna.png")
if err != nil {
panic(err)
}
pattern := gg.NewSurfacePattern(im, gg.RepeatBoth)
dc := gg.NewContext(600, 600)
dc.MoveTo(20, 20)
dc.LineTo(590, 20)
dc.LineTo(590, 590)
dc.LineTo(20, 590)
dc.ClosePath()
dc.SetFillStyle(pattern)
dc.Fill()
dc.SavePNG("out.png")
}

54
vendor/github.com/fogleman/gg/examples/quadratic.go generated vendored Normal file
View File

@ -0,0 +1,54 @@
package main
import "github.com/fogleman/gg"
func main() {
const S = 1000
dc := gg.NewContext(S, S)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.Translate(S/2, S/2)
dc.Scale(40, 40)
var x0, y0, x1, y1, x2, y2, x3, y3, x4, y4 float64
x0, y0 = -10, 0
x1, y1 = -5, -10
x2, y2 = 0, 0
x3, y3 = 5, 10
x4, y4 = 10, 0
dc.MoveTo(x0, y0)
dc.LineTo(x1, y1)
dc.LineTo(x2, y2)
dc.LineTo(x3, y3)
dc.LineTo(x4, y4)
dc.SetHexColor("FF2D00")
dc.SetLineWidth(8)
dc.Stroke()
dc.MoveTo(x0, y0)
dc.QuadraticTo(x1, y1, x2, y2)
dc.QuadraticTo(x3, y3, x4, y4)
dc.SetHexColor("3E606F")
dc.SetLineWidth(16)
dc.FillPreserve()
dc.SetRGB(0, 0, 0)
dc.Stroke()
dc.DrawCircle(x0, y0, 0.5)
dc.DrawCircle(x1, y1, 0.5)
dc.DrawCircle(x2, y2, 0.5)
dc.DrawCircle(x3, y3, 0.5)
dc.DrawCircle(x4, y4, 0.5)
dc.SetRGB(1, 1, 1)
dc.FillPreserve()
dc.SetRGB(0, 0, 0)
dc.SetLineWidth(4)
dc.Stroke()
dc.LoadFontFace("/Library/Fonts/Arial.ttf", 200)
dc.DrawStringAnchored("g", -5, 5, 0.5, 0.5)
dc.DrawStringAnchored("G", 5, -5, 0.5, 0.5)
dc.SavePNG("out.png")
}

66
vendor/github.com/fogleman/gg/examples/scatter.go generated vendored Normal file
View File

@ -0,0 +1,66 @@
package main
import (
"math/rand"
"github.com/fogleman/gg"
)
func CreatePoints(n int) []gg.Point {
points := make([]gg.Point, n)
for i := 0; i < n; i++ {
x := 0.5 + rand.NormFloat64()*0.1
y := x + rand.NormFloat64()*0.1
points[i] = gg.Point{x, y}
}
return points
}
func main() {
const S = 1024
const P = 64
dc := gg.NewContext(S, S)
dc.InvertY()
dc.SetRGB(1, 1, 1)
dc.Clear()
points := CreatePoints(1000)
dc.Translate(P, P)
dc.Scale(S-P*2, S-P*2)
// draw minor grid
for i := 1; i <= 10; i++ {
x := float64(i) / 10
dc.MoveTo(x, 0)
dc.LineTo(x, 1)
dc.MoveTo(0, x)
dc.LineTo(1, x)
}
dc.SetRGBA(0, 0, 0, 0.25)
dc.SetLineWidth(1)
dc.Stroke()
// draw axes
dc.MoveTo(0, 0)
dc.LineTo(1, 0)
dc.MoveTo(0, 0)
dc.LineTo(0, 1)
dc.SetRGB(0, 0, 0)
dc.SetLineWidth(4)
dc.Stroke()
// draw points
dc.SetRGBA(0, 0, 1, 0.5)
for _, p := range points {
dc.DrawCircle(p.X, p.Y, 3.0/S)
dc.Fill()
}
// draw text
dc.Identity()
dc.SetRGB(0, 0, 0)
if err := dc.LoadFontFace("/Library/Fonts/Arial Bold.ttf", 24); err != nil {
panic(err)
}
dc.DrawStringAnchored("Chart Title", S/2, P/2, 0.5, 0.5)
if err := dc.LoadFontFace("/Library/Fonts/Arial.ttf", 18); err != nil {
panic(err)
}
dc.DrawStringAnchored("X Axis Title", S/2, S-P/2, 0.5, 0.5)
dc.SavePNG("out.png")
}

29
vendor/github.com/fogleman/gg/examples/sine.go generated vendored Normal file
View File

@ -0,0 +1,29 @@
package main
import (
"math"
"github.com/fogleman/gg"
)
func main() {
const W = 1200
const H = 60
dc := gg.NewContext(W, H)
// dc.SetHexColor("#FFFFFF")
// dc.Clear()
dc.ScaleAbout(0.95, 0.75, W/2, H/2)
for i := 0; i < W; i++ {
a := float64(i) * 2 * math.Pi / W * 8
x := float64(i)
y := (math.Sin(a) + 1) / 2 * H
dc.LineTo(x, y)
}
dc.ClosePath()
dc.SetHexColor("#3E606F")
dc.FillPreserve()
dc.SetHexColor("#19344180")
dc.SetLineWidth(8)
dc.Stroke()
dc.SavePNG("out.png")
}

27
vendor/github.com/fogleman/gg/examples/spiral.go generated vendored Normal file
View File

@ -0,0 +1,27 @@
package main
import (
"math"
"github.com/fogleman/gg"
)
func main() {
const S = 1024
const N = 2048
dc := gg.NewContext(S, S)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.SetRGB(0, 0, 0)
for i := 0; i <= N; i++ {
t := float64(i) / N
d := t*S*0.4 + 10
a := t * math.Pi * 2 * 20
x := S/2 + math.Cos(a)*d
y := S/2 + math.Sin(a)*d
r := t * 8
dc.DrawCircle(x, y, r)
}
dc.Fill()
dc.SavePNG("out.png")
}

40
vendor/github.com/fogleman/gg/examples/star.go generated vendored Normal file
View File

@ -0,0 +1,40 @@
package main
import (
"math"
"github.com/fogleman/gg"
)
type Point struct {
X, Y float64
}
func Polygon(n int, x, y, r float64) []Point {
result := make([]Point, n)
for i := 0; i < n; i++ {
a := float64(i)*2*math.Pi/float64(n) - math.Pi/2
result[i] = Point{x + r*math.Cos(a), y + r*math.Sin(a)}
}
return result
}
func main() {
n := 5
points := Polygon(n, 512, 512, 400)
dc := gg.NewContext(1024, 1024)
dc.SetHexColor("fff")
dc.Clear()
for i := 0; i < n+1; i++ {
index := (i * 2) % n
p := points[index]
dc.LineTo(p.X, p.Y)
}
dc.SetRGBA(0, 0.5, 0, 1)
dc.SetFillRule(gg.FillRuleEvenOdd)
dc.FillPreserve()
dc.SetRGBA(0, 1, 0, 0.5)
dc.SetLineWidth(16)
dc.Stroke()
dc.SavePNG("out.png")
}

51
vendor/github.com/fogleman/gg/examples/stars.go generated vendored Normal file
View File

@ -0,0 +1,51 @@
package main
import (
"math"
"math/rand"
"github.com/fogleman/gg"
)
type Point struct {
X, Y float64
}
func Polygon(n int) []Point {
result := make([]Point, n)
for i := 0; i < n; i++ {
a := float64(i)*2*math.Pi/float64(n) - math.Pi/2
result[i] = Point{math.Cos(a), math.Sin(a)}
}
return result
}
func main() {
const W = 1200
const H = 120
const S = 100
dc := gg.NewContext(W, H)
dc.SetHexColor("#FFFFFF")
dc.Clear()
n := 5
points := Polygon(n)
for x := S / 2; x < W; x += S {
dc.Push()
s := rand.Float64()*S/4 + S/4
dc.Translate(float64(x), H/2)
dc.Rotate(rand.Float64() * 2 * math.Pi)
dc.Scale(s, s)
for i := 0; i < n+1; i++ {
index := (i * 2) % n
p := points[index]
dc.LineTo(p.X, p.Y)
}
dc.SetLineWidth(10)
dc.SetHexColor("#FFCC00")
dc.StrokePreserve()
dc.SetHexColor("#FFE43A")
dc.Fill()
dc.Pop()
}
dc.SavePNG("out.png")
}

16
vendor/github.com/fogleman/gg/examples/text.go generated vendored Normal file
View File

@ -0,0 +1,16 @@
package main
import "github.com/fogleman/gg"
func main() {
const S = 1024
dc := gg.NewContext(S, S)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.SetRGB(0, 0, 0)
if err := dc.LoadFontFace("/Library/Fonts/Arial.ttf", 96); err != nil {
panic(err)
}
dc.DrawStringAnchored("Hello, world!", S/2, S/2, 0.5, 0.5)
dc.SavePNG("out.png")
}

21
vendor/github.com/fogleman/gg/examples/tiling.go generated vendored Normal file
View File

@ -0,0 +1,21 @@
package main
import "github.com/fogleman/gg"
func main() {
const NX = 4
const NY = 3
im, err := gg.LoadPNG("examples/gopher.png")
if err != nil {
panic(err)
}
w := im.Bounds().Size().X
h := im.Bounds().Size().Y
dc := gg.NewContext(w*NX, h*NY)
for y := 0; y < NY; y++ {
for x := 0; x < NX; x++ {
dc.DrawImage(im, x*w, y*h)
}
}
dc.SavePNG("out.png")
}

40
vendor/github.com/fogleman/gg/examples/wrap.go generated vendored Normal file
View File

@ -0,0 +1,40 @@
package main
import "github.com/fogleman/gg"
const TEXT = "Call me Ishmael. Some years ago—never mind how long precisely—having little or no money in my purse, and nothing particular to interest me on shore, I thought I would sail about a little and see the watery part of the world. It is a way I have of driving off the spleen and regulating the circulation. Whenever I find myself growing grim about the mouth; whenever it is a damp, drizzly November in my soul; whenever I find myself involuntarily pausing before coffin warehouses, and bringing up the rear of every funeral I meet; and especially whenever my hypos get such an upper hand of me, that it requires a strong moral principle to prevent me from deliberately stepping into the street, and methodically knocking people's hats off—then, I account it high time to get to sea as soon as I can. This is my substitute for pistol and ball. With a philosophical flourish Cato throws himself upon his sword; I quietly take to the ship. There is nothing surprising in this. If they but knew it, almost all men in their degree, some time or other, cherish very nearly the same feelings towards the ocean with me."
func main() {
const W = 1024
const H = 1024
const P = 16
dc := gg.NewContext(W, H)
dc.SetRGB(1, 1, 1)
dc.Clear()
dc.DrawLine(W/2, 0, W/2, H)
dc.DrawLine(0, H/2, W, H/2)
dc.DrawRectangle(P, P, W-P-P, H-P-P)
dc.SetRGBA(0, 0, 1, 0.25)
dc.SetLineWidth(3)
dc.Stroke()
dc.SetRGB(0, 0, 0)
if err := dc.LoadFontFace("/Library/Fonts/Arial Bold.ttf", 18); err != nil {
panic(err)
}
dc.DrawStringWrapped("UPPER LEFT", P, P, 0, 0, 0, 1.5, gg.AlignLeft)
dc.DrawStringWrapped("UPPER RIGHT", W-P, P, 1, 0, 0, 1.5, gg.AlignRight)
dc.DrawStringWrapped("BOTTOM LEFT", P, H-P, 0, 1, 0, 1.5, gg.AlignLeft)
dc.DrawStringWrapped("BOTTOM RIGHT", W-P, H-P, 1, 1, 0, 1.5, gg.AlignRight)
dc.DrawStringWrapped("UPPER MIDDLE", W/2, P, 0.5, 0, 0, 1.5, gg.AlignCenter)
dc.DrawStringWrapped("LOWER MIDDLE", W/2, H-P, 0.5, 1, 0, 1.5, gg.AlignCenter)
dc.DrawStringWrapped("LEFT MIDDLE", P, H/2, 0, 0.5, 0, 1.5, gg.AlignLeft)
dc.DrawStringWrapped("RIGHT MIDDLE", W-P, H/2, 1, 0.5, 0, 1.5, gg.AlignRight)
if err := dc.LoadFontFace("/Library/Fonts/Arial.ttf", 12); err != nil {
panic(err)
}
dc.DrawStringWrapped(TEXT, W/2-P, H/2-P, 1, 1, W/3, 1.75, gg.AlignLeft)
dc.DrawStringWrapped(TEXT, W/2+P, H/2-P, 0, 1, W/3, 2, gg.AlignLeft)
dc.DrawStringWrapped(TEXT, W/2-P, H/2+P, 1, 0, W/3, 2.25, gg.AlignLeft)
dc.DrawStringWrapped(TEXT, W/2+P, H/2+P, 0, 0, W/3, 2.5, gg.AlignLeft)
dc.SavePNG("out.png")
}

202
vendor/github.com/fogleman/gg/gradient.go generated vendored Normal file
View File

@ -0,0 +1,202 @@
package gg
import (
"image/color"
"math"
"sort"
)
type stop struct {
pos float64
color color.Color
}
type stops []stop
// Len satisfies the Sort interface.
func (s stops) Len() int {
return len(s)
}
// Less satisfies the Sort interface.
func (s stops) Less(i, j int) bool {
return s[i].pos < s[j].pos
}
// Swap satisfies the Sort interface.
func (s stops) Swap(i, j int) {
s[i], s[j] = s[j], s[i]
}
type Gradient interface {
Pattern
AddColorStop(offset float64, color color.Color)
}
// Linear Gradient
type linearGradient struct {
x0, y0, x1, y1 float64
stops stops
}
func (g *linearGradient) ColorAt(x, y int) color.Color {
if len(g.stops) == 0 {
return color.Transparent
}
fx, fy := float64(x), float64(y)
x0, y0, x1, y1 := g.x0, g.y0, g.x1, g.y1
dx, dy := x1-x0, y1-y0
// Horizontal
if dy == 0 && dx != 0 {
return getColor((fx-x0)/dx, g.stops)
}
// Vertical
if dx == 0 && dy != 0 {
return getColor((fy-y0)/dy, g.stops)
}
// Dot product
s0 := dx*(fx-x0) + dy*(fy-y0)
if s0 < 0 {
return g.stops[0].color
}
// Calculate distance to (x0,y0) alone (x0,y0)->(x1,y1)
mag := math.Hypot(dx, dy)
u := ((fx-x0)*-dy + (fy-y0)*dx) / (mag * mag)
x2, y2 := x0+u*-dy, y0+u*dx
d := math.Hypot(fx-x2, fy-y2) / mag
return getColor(d, g.stops)
}
func (g *linearGradient) AddColorStop(offset float64, color color.Color) {
g.stops = append(g.stops, stop{pos: offset, color: color})
sort.Sort(g.stops)
}
func NewLinearGradient(x0, y0, x1, y1 float64) Gradient {
g := &linearGradient{
x0: x0, y0: y0,
x1: x1, y1: y1,
}
return g
}
// Radial Gradient
type circle struct {
x, y, r float64
}
type radialGradient struct {
c0, c1, cd circle
a, inva float64
mindr float64
stops stops
}
func dot3(x0, y0, z0, x1, y1, z1 float64) float64 {
return x0*x1 + y0*y1 + z0*z1
}
func (g *radialGradient) ColorAt(x, y int) color.Color {
if len(g.stops) == 0 {
return color.Transparent
}
// copy from pixman's pixman-radial-gradient.c
dx, dy := float64(x)+0.5-g.c0.x, float64(y)+0.5-g.c0.y
b := dot3(dx, dy, g.c0.r, g.cd.x, g.cd.y, g.cd.r)
c := dot3(dx, dy, -g.c0.r, dx, dy, g.c0.r)
if g.a == 0 {
if b == 0 {
return color.Transparent
}
t := 0.5 * c / b
if t*g.cd.r >= g.mindr {
return getColor(t, g.stops)
}
return color.Transparent
}
discr := dot3(b, g.a, 0, b, -c, 0)
if discr >= 0 {
sqrtdiscr := math.Sqrt(discr)
t0 := (b + sqrtdiscr) * g.inva
t1 := (b - sqrtdiscr) * g.inva
if t0*g.cd.r >= g.mindr {
return getColor(t0, g.stops)
} else if t1*g.cd.r >= g.mindr {
return getColor(t1, g.stops)
}
}
return color.Transparent
}
func (g *radialGradient) AddColorStop(offset float64, color color.Color) {
g.stops = append(g.stops, stop{pos: offset, color: color})
sort.Sort(g.stops)
}
func NewRadialGradient(x0, y0, r0, x1, y1, r1 float64) Gradient {
c0 := circle{x0, y0, r0}
c1 := circle{x1, y1, r1}
cd := circle{x1 - x0, y1 - y0, r1 - r0}
a := dot3(cd.x, cd.y, -cd.r, cd.x, cd.y, cd.r)
var inva float64
if a != 0 {
inva = 1.0 / a
}
mindr := -c0.r
g := &radialGradient{
c0: c0,
c1: c1,
cd: cd,
a: a,
inva: inva,
mindr: mindr,
}
return g
}
func getColor(pos float64, stops stops) color.Color {
if pos <= 0.0 || len(stops) == 1 {
return stops[0].color
}
last := stops[len(stops)-1]
if pos >= last.pos {
return last.color
}
for i, stop := range stops[1:] {
if pos < stop.pos {
pos = (pos - stops[i].pos) / (stop.pos - stops[i].pos)
return colorLerp(stops[i].color, stop.color, pos)
}
}
return last.color
}
func colorLerp(c0, c1 color.Color, t float64) color.Color {
r0, g0, b0, a0 := c0.RGBA()
r1, g1, b1, a1 := c1.RGBA()
return color.NRGBA{
lerp(r0, r1, t),
lerp(g0, g1, t),
lerp(b0, b1, t),
lerp(a0, a1, t),
}
}
func lerp(a, b uint32, t float64) uint8 {
return uint8(int32(float64(a)*(1.0-t)+float64(b)*t) >> 8)
}

88
vendor/github.com/fogleman/gg/matrix.go generated vendored Normal file
View File

@ -0,0 +1,88 @@
package gg
import "math"
type Matrix struct {
XX, YX, XY, YY, X0, Y0 float64
}
func Identity() Matrix {
return Matrix{
1, 0,
0, 1,
0, 0,
}
}
func Translate(x, y float64) Matrix {
return Matrix{
1, 0,
0, 1,
x, y,
}
}
func Scale(x, y float64) Matrix {
return Matrix{
x, 0,
0, y,
0, 0,
}
}
func Rotate(angle float64) Matrix {
c := math.Cos(angle)
s := math.Sin(angle)
return Matrix{
c, s,
-s, c,
0, 0,
}
}
func Shear(x, y float64) Matrix {
return Matrix{
1, y,
x, 1,
0, 0,
}
}
func (a Matrix) Multiply(b Matrix) Matrix {
return Matrix{
a.XX*b.XX + a.YX*b.XY,
a.XX*b.YX + a.YX*b.YY,
a.XY*b.XX + a.YY*b.XY,
a.XY*b.YX + a.YY*b.YY,
a.X0*b.XX + a.Y0*b.XY + b.X0,
a.X0*b.YX + a.Y0*b.YY + b.Y0,
}
}
func (a Matrix) TransformVector(x, y float64) (tx, ty float64) {
tx = a.XX*x + a.XY*y
ty = a.YX*x + a.YY*y
return
}
func (a Matrix) TransformPoint(x, y float64) (tx, ty float64) {
tx = a.XX*x + a.XY*y + a.X0
ty = a.YX*x + a.YY*y + a.Y0
return
}
func (a Matrix) Translate(x, y float64) Matrix {
return Translate(x, y).Multiply(a)
}
func (a Matrix) Scale(x, y float64) Matrix {
return Scale(x, y).Multiply(a)
}
func (a Matrix) Rotate(angle float64) Matrix {
return Rotate(angle).Multiply(a)
}
func (a Matrix) Shear(x, y float64) Matrix {
return Shear(x, y).Multiply(a)
}

140
vendor/github.com/fogleman/gg/path.go generated vendored Normal file
View File

@ -0,0 +1,140 @@
package gg
import (
"github.com/golang/freetype/raster"
"golang.org/x/image/math/fixed"
)
func flattenPath(p raster.Path) [][]Point {
var result [][]Point
var path []Point
var cx, cy float64
for i := 0; i < len(p); {
switch p[i] {
case 0:
if len(path) > 0 {
result = append(result, path)
path = nil
}
x := unfix(p[i+1])
y := unfix(p[i+2])
path = append(path, Point{x, y})
cx, cy = x, y
i += 4
case 1:
x := unfix(p[i+1])
y := unfix(p[i+2])
path = append(path, Point{x, y})
cx, cy = x, y
i += 4
case 2:
x1 := unfix(p[i+1])
y1 := unfix(p[i+2])
x2 := unfix(p[i+3])
y2 := unfix(p[i+4])
points := QuadraticBezier(cx, cy, x1, y1, x2, y2)
path = append(path, points...)
cx, cy = x2, y2
i += 6
case 3:
x1 := unfix(p[i+1])
y1 := unfix(p[i+2])
x2 := unfix(p[i+3])
y2 := unfix(p[i+4])
x3 := unfix(p[i+5])
y3 := unfix(p[i+6])
points := CubicBezier(cx, cy, x1, y1, x2, y2, x3, y3)
path = append(path, points...)
cx, cy = x3, y3
i += 8
default:
panic("bad path")
}
}
if len(path) > 0 {
result = append(result, path)
}
return result
}
func dashPath(paths [][]Point, dashes []float64) [][]Point {
var result [][]Point
if len(dashes) == 0 {
return paths
}
if len(dashes) == 1 {
dashes = append(dashes, dashes[0])
}
for _, path := range paths {
if len(path) < 2 {
continue
}
previous := path[0]
pathIndex := 1
dashIndex := 0
segmentLength := 0.0
var segment []Point
segment = append(segment, previous)
for pathIndex < len(path) {
dashLength := dashes[dashIndex]
point := path[pathIndex]
d := previous.Distance(point)
maxd := dashLength - segmentLength
if d > maxd {
t := maxd / d
p := previous.Interpolate(point, t)
segment = append(segment, p)
if dashIndex%2 == 0 && len(segment) > 1 {
result = append(result, segment)
}
segment = nil
segment = append(segment, p)
segmentLength = 0
previous = p
dashIndex = (dashIndex + 1) % len(dashes)
} else {
segment = append(segment, point)
previous = point
segmentLength += d
pathIndex++
}
}
if dashIndex%2 == 0 && len(segment) > 1 {
result = append(result, segment)
}
}
return result
}
func rasterPath(paths [][]Point) raster.Path {
var result raster.Path
for _, path := range paths {
var previous fixed.Point26_6
for i, point := range path {
f := point.Fixed()
if i == 0 {
result.Start(f)
} else {
dx := f.X - previous.X
dy := f.Y - previous.Y
if dx < 0 {
dx = -dx
}
if dy < 0 {
dy = -dy
}
if dx+dy > 8 {
// TODO: this is a hack for cases where two points are
// too close - causes rendering issues with joins / caps
result.Add1(f)
}
}
previous = f
}
}
return result
}
func dashed(path raster.Path, dashes []float64) raster.Path {
return rasterPath(dashPath(flattenPath(path), dashes))
}

123
vendor/github.com/fogleman/gg/pattern.go generated vendored Normal file
View File

@ -0,0 +1,123 @@
package gg
import (
"image"
"image/color"
"github.com/golang/freetype/raster"
)
type RepeatOp int
const (
RepeatBoth RepeatOp = iota
RepeatX
RepeatY
RepeatNone
)
type Pattern interface {
ColorAt(x, y int) color.Color
}
// Solid Pattern
type solidPattern struct {
color color.Color
}
func (p *solidPattern) ColorAt(x, y int) color.Color {
return p.color
}
func NewSolidPattern(color color.Color) Pattern {
return &solidPattern{color: color}
}
// Surface Pattern
type surfacePattern struct {
im image.Image
op RepeatOp
}
func (p *surfacePattern) ColorAt(x, y int) color.Color {
b := p.im.Bounds()
switch p.op {
case RepeatX:
if y >= b.Dy() {
return color.Transparent
}
case RepeatY:
if x >= b.Dx() {
return color.Transparent
}
case RepeatNone:
if x >= b.Dx() || y >= b.Dy() {
return color.Transparent
}
}
x = x%b.Dx() + b.Min.X
y = y%b.Dy() + b.Min.Y
return p.im.At(x, y)
}
func NewSurfacePattern(im image.Image, op RepeatOp) Pattern {
return &surfacePattern{im: im, op: op}
}
type patternPainter struct {
im *image.RGBA
mask *image.Alpha
p Pattern
}
// Paint satisfies the Painter interface.
func (r *patternPainter) Paint(ss []raster.Span, done bool) {
b := r.im.Bounds()
for _, s := range ss {
if s.Y < b.Min.Y {
continue
}
if s.Y >= b.Max.Y {
return
}
if s.X0 < b.Min.X {
s.X0 = b.Min.X
}
if s.X1 > b.Max.X {
s.X1 = b.Max.X
}
if s.X0 >= s.X1 {
continue
}
const m = 1<<16 - 1
y := s.Y - r.im.Rect.Min.Y
x0 := s.X0 - r.im.Rect.Min.X
// RGBAPainter.Paint() in $GOPATH/src/github.com/golang/freetype/raster/paint.go
i0 := (s.Y-r.im.Rect.Min.Y)*r.im.Stride + (s.X0-r.im.Rect.Min.X)*4
i1 := i0 + (s.X1-s.X0)*4
for i, x := i0, x0; i < i1; i, x = i+4, x+1 {
ma := s.Alpha
if r.mask != nil {
ma = ma * uint32(r.mask.AlphaAt(x, y).A) / 255
if ma == 0 {
continue
}
}
c := r.p.ColorAt(x, y)
cr, cg, cb, ca := c.RGBA()
dr := uint32(r.im.Pix[i+0])
dg := uint32(r.im.Pix[i+1])
db := uint32(r.im.Pix[i+2])
da := uint32(r.im.Pix[i+3])
a := (m - (ca * ma / m)) * 0x101
r.im.Pix[i+0] = uint8((dr*a + cr*ma) / m >> 8)
r.im.Pix[i+1] = uint8((dg*a + cg*ma) / m >> 8)
r.im.Pix[i+2] = uint8((db*a + cb*ma) / m >> 8)
r.im.Pix[i+3] = uint8((da*a + ca*ma) / m >> 8)
}
}
}
func newPatternPainter(im *image.RGBA, mask *image.Alpha, p Pattern) *patternPainter {
return &patternPainter{im, mask, p}
}

25
vendor/github.com/fogleman/gg/point.go generated vendored Normal file
View File

@ -0,0 +1,25 @@
package gg
import (
"math"
"golang.org/x/image/math/fixed"
)
type Point struct {
X, Y float64
}
func (a Point) Fixed() fixed.Point26_6 {
return fixp(a.X, a.Y)
}
func (a Point) Distance(b Point) float64 {
return math.Hypot(a.X-b.X, a.Y-b.Y)
}
func (a Point) Interpolate(b Point, t float64) Point {
x := a.X + (b.X-a.X)*t
y := a.Y + (b.Y-a.Y)*t
return Point{x, y}
}

117
vendor/github.com/fogleman/gg/util.go generated vendored Normal file
View File

@ -0,0 +1,117 @@
package gg
import (
"fmt"
"image"
"image/draw"
_ "image/jpeg"
"image/png"
"io/ioutil"
"math"
"os"
"strings"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
func Radians(degrees float64) float64 {
return degrees * math.Pi / 180
}
func Degrees(radians float64) float64 {
return radians * 180 / math.Pi
}
func LoadImage(path string) (image.Image, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
im, _, err := image.Decode(file)
return im, err
}
func LoadPNG(path string) (image.Image, error) {
file, err := os.Open(path)
if err != nil {
return nil, err
}
defer file.Close()
return png.Decode(file)
}
func SavePNG(path string, im image.Image) error {
file, err := os.Create(path)
if err != nil {
return err
}
defer file.Close()
return png.Encode(file, im)
}
func imageToRGBA(src image.Image) *image.RGBA {
dst := image.NewRGBA(src.Bounds())
draw.Draw(dst, dst.Rect, src, image.ZP, draw.Src)
return dst
}
func parseHexColor(x string) (r, g, b, a int) {
x = strings.TrimPrefix(x, "#")
a = 255
if len(x) == 3 {
format := "%1x%1x%1x"
fmt.Sscanf(x, format, &r, &g, &b)
r |= r << 4
g |= g << 4
b |= b << 4
}
if len(x) == 6 {
format := "%02x%02x%02x"
fmt.Sscanf(x, format, &r, &g, &b)
}
if len(x) == 8 {
format := "%02x%02x%02x%02x"
fmt.Sscanf(x, format, &r, &g, &b, &a)
}
return
}
func fixp(x, y float64) fixed.Point26_6 {
return fixed.Point26_6{fix(x), fix(y)}
}
func fix(x float64) fixed.Int26_6 {
return fixed.Int26_6(x * 64)
}
func unfix(x fixed.Int26_6) float64 {
const shift, mask = 6, 1<<6 - 1
if x >= 0 {
return float64(x>>shift) + float64(x&mask)/64
}
x = -x
if x >= 0 {
return -(float64(x>>shift) + float64(x&mask)/64)
}
return 0
}
func LoadFontFace(path string, points float64) (font.Face, error) {
fontBytes, err := ioutil.ReadFile(path)
if err != nil {
return nil, err
}
f, err := truetype.Parse(fontBytes)
if err != nil {
return nil, err
}
face := truetype.NewFace(f, &truetype.Options{
Size: points,
// Hinting: font.HintingFull,
})
return face, nil
}

58
vendor/github.com/fogleman/gg/wrap.go generated vendored Normal file
View File

@ -0,0 +1,58 @@
package gg
import (
"strings"
"unicode"
)
type measureStringer interface {
MeasureString(s string) (w, h float64)
}
func splitOnSpace(x string) []string {
var result []string
pi := 0
ps := false
for i, c := range x {
s := unicode.IsSpace(c)
if s != ps && i > 0 {
result = append(result, x[pi:i])
pi = i
}
ps = s
}
result = append(result, x[pi:])
return result
}
func wordWrap(m measureStringer, s string, width float64) []string {
var result []string
for _, line := range strings.Split(s, "\n") {
fields := splitOnSpace(line)
if len(fields)%2 == 1 {
fields = append(fields, "")
}
x := ""
for i := 0; i < len(fields); i += 2 {
w, _ := m.MeasureString(x + fields[i])
if w > width {
if x == "" {
result = append(result, fields[i])
x = ""
continue
} else {
result = append(result, x)
x = ""
}
}
x += fields[i] + fields[i+1]
}
if x != "" {
result = append(result, x)
}
}
for i, line := range result {
result[i] = strings.TrimSpace(line)
}
return result
}

20
vendor/github.com/golang/freetype/AUTHORS generated vendored Normal file
View File

@ -0,0 +1,20 @@
# This is the official list of Freetype-Go authors for copyright purposes.
# This file is distinct from the CONTRIBUTORS files.
# See the latter for an explanation.
#
# Freetype-Go is derived from Freetype, which is written in C. The latter
# is copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg.
# Names should be added to this file as
# Name or Organization <email address>
# The email address is not required for organizations.
# Please keep the list sorted.
Google Inc.
Jeff R. Allen <jra@nella.org>
Maksim Kochkin <maxxarts@gmail.com>
Michael Fogleman <fogleman@gmail.com>
Rémy Oudompheng <oudomphe@phare.normalesup.org>
Roger Peppe <rogpeppe@gmail.com>
Steven Edwards <steven@stephenwithav.com>

38
vendor/github.com/golang/freetype/CONTRIBUTORS generated vendored Normal file
View File

@ -0,0 +1,38 @@
# This is the official list of people who can contribute
# (and typically have contributed) code to the Freetype-Go repository.
# The AUTHORS file lists the copyright holders; this file
# lists people. For example, Google employees are listed here
# but not in AUTHORS, because Google holds the copyright.
#
# The submission process automatically checks to make sure
# that people submitting code are listed in this file (by email address).
#
# Names should be added to this file only after verifying that
# the individual or the individual's organization has agreed to
# the appropriate Contributor License Agreement, found here:
#
# http://code.google.com/legal/individual-cla-v1.0.html
# http://code.google.com/legal/corporate-cla-v1.0.html
#
# The agreement for individuals can be filled out on the web.
#
# When adding J Random Contributor's name to this file,
# either J's name or J's organization's name should be
# added to the AUTHORS file, depending on whether the
# individual or corporate CLA was used.
# Names should be added to this file like so:
# Name <email address>
# Please keep the list sorted.
Andrew Gerrand <adg@golang.org>
Jeff R. Allen <jra@nella.org> <jeff.allen@gmail.com>
Maksim Kochkin <maxxarts@gmail.com>
Michael Fogleman <fogleman@gmail.com>
Nigel Tao <nigeltao@golang.org>
Rémy Oudompheng <oudomphe@phare.normalesup.org> <remyoudompheng@gmail.com>
Rob Pike <r@golang.org>
Roger Peppe <rogpeppe@gmail.com>
Russ Cox <rsc@golang.org>
Steven Edwards <steven@stephenwithav.com>

12
vendor/github.com/golang/freetype/LICENSE generated vendored Normal file
View File

@ -0,0 +1,12 @@
Use of the Freetype-Go software is subject to your choice of exactly one of
the following two licenses:
* The FreeType License, which is similar to the original BSD license with
an advertising clause, or
* The GNU General Public License (GPL), version 2 or later.
The text of these licenses are available in the licenses/ftl.txt and the
licenses/gpl.txt files respectively. They are also available at
http://freetype.sourceforge.net/license.html
The Luxi fonts in the testdata directory are licensed separately. See the
testdata/COPYING file for details.

21
vendor/github.com/golang/freetype/README generated vendored Normal file
View File

@ -0,0 +1,21 @@
The Freetype font rasterizer in the Go programming language.
To download and install from source:
$ go get github.com/golang/freetype
It is an incomplete port:
* It only supports TrueType fonts, and not Type 1 fonts nor bitmap fonts.
* It only supports the Unicode encoding.
There are also some implementation differences:
* It uses a 26.6 fixed point co-ordinate system everywhere internally,
as opposed to the original Freetype's mix of 26.6 (or 10.6 for 16-bit
systems) in some places, and 24.8 in the "smooth" rasterizer.
Freetype-Go is derived from Freetype, which is written in C. Freetype is
copyright 1996-2010 David Turner, Robert Wilhelm, and Werner Lemberg.
Freetype-Go is copyright The Freetype-Go Authors, who are listed in the
AUTHORS file.
Unless otherwise noted, the Freetype-Go source files are distributed
under the BSD-style license found in the LICENSE file.

View File

@ -0,0 +1,87 @@
/*
gcc main.c -I/usr/include/freetype2 -lfreetype && ./a.out 12 ../../testdata/luxisr.ttf with_hinting
*/
#include <stdio.h>
#include <ft2build.h>
#include FT_FREETYPE_H
void usage(char** argv) {
fprintf(stderr, "usage: %s font_size font_file [with_hinting|sans_hinting]\n", argv[0]);
}
int main(int argc, char** argv) {
FT_Error error;
FT_Library library;
FT_Face face;
FT_Glyph_Metrics* m;
FT_Outline* o;
FT_Int major, minor, patch;
int i, j, font_size, no_hinting;
if (argc != 4) {
usage(argv);
return 1;
}
font_size = atoi(argv[1]);
if (font_size <= 0) {
fprintf(stderr, "invalid font_size\n");
usage(argv);
return 1;
}
if (!strcmp(argv[3], "with_hinting")) {
no_hinting = 0;
} else if (!strcmp(argv[3], "sans_hinting")) {
no_hinting = 1;
} else {
fprintf(stderr, "neither \"with_hinting\" nor \"sans_hinting\"\n");
usage(argv);
return 1;
};
error = FT_Init_FreeType(&library);
if (error) {
fprintf(stderr, "FT_Init_FreeType: error #%d\n", error);
return 1;
}
FT_Library_Version(library, &major, &minor, &patch);
printf("freetype version %d.%d.%d\n", major, minor, patch);
error = FT_New_Face(library, argv[2], 0, &face);
if (error) {
fprintf(stderr, "FT_New_Face: error #%d\n", error);
return 1;
}
error = FT_Set_Char_Size(face, 0, font_size*64, 0, 0);
if (error) {
fprintf(stderr, "FT_Set_Char_Size: error #%d\n", error);
return 1;
}
for (i = 0; i < face->num_glyphs; i++) {
error = FT_Load_Glyph(face, i, no_hinting ? FT_LOAD_NO_HINTING : FT_LOAD_DEFAULT);
if (error) {
fprintf(stderr, "FT_Load_Glyph: glyph %d: error #%d\n", i, error);
return 1;
}
if (face->glyph->format != FT_GLYPH_FORMAT_OUTLINE) {
fprintf(stderr, "glyph format for glyph %d is not FT_GLYPH_FORMAT_OUTLINE\n", i);
return 1;
}
m = &face->glyph->metrics;
/* Print what Go calls the AdvanceWidth, and then: XMin, YMin, XMax, YMax. */
printf("%ld %ld %ld %ld %ld;",
m->horiAdvance,
m->horiBearingX,
m->horiBearingY - m->height,
m->horiBearingX + m->width,
m->horiBearingY);
/* Print the glyph points. */
o = &face->glyph->outline;
for (j = 0; j < o->n_points; j++) {
if (j != 0) {
printf(", ");
}
printf("%ld %ld %d", o->points[j].x, o->points[j].y, o->tags[j] & 0x01);
}
printf("\n");
}
return 0;
}

View File

@ -0,0 +1,85 @@
// Copyright 2016 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"bufio"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"log"
"os"
"github.com/golang/freetype/raster"
"golang.org/x/image/math/fixed"
)
func main() {
const (
w = 400
h = 400
)
r := raster.NewRasterizer(w, h)
r.UseNonZeroWinding = true
cjs := []struct {
c raster.Capper
j raster.Joiner
}{
{raster.RoundCapper, raster.RoundJoiner},
{raster.ButtCapper, raster.BevelJoiner},
{raster.SquareCapper, raster.BevelJoiner},
}
for i, cj := range cjs {
var path raster.Path
path.Start(fixed.P(30+100*i, 30+120*i))
path.Add1(fixed.P(180+100*i, 80+120*i))
path.Add1(fixed.P(50+100*i, 130+120*i))
raster.Stroke(r, path, fixed.I(20), cj.c, cj.j)
}
rgba := image.NewRGBA(image.Rect(0, 0, w, h))
draw.Draw(rgba, rgba.Bounds(), image.Black, image.Point{}, draw.Src)
p := raster.NewRGBAPainter(rgba)
p.SetColor(color.RGBA{0x7f, 0x7f, 0x7f, 0xff})
r.Rasterize(p)
white := color.RGBA{0xff, 0xff, 0xff, 0xff}
for i := range cjs {
rgba.SetRGBA(30+100*i, 30+120*i, white)
rgba.SetRGBA(180+100*i, 80+120*i, white)
rgba.SetRGBA(50+100*i, 130+120*i, white)
}
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, rgba)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

View File

@ -0,0 +1,158 @@
// Copyright 2015 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"bufio"
"flag"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"io/ioutil"
"log"
"math"
"os"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
var (
dpi = flag.Float64("dpi", 72, "screen resolution in Dots Per Inch")
fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
hinting = flag.String("hinting", "none", "none | full")
size = flag.Float64("size", 12, "font size in points")
spacing = flag.Float64("spacing", 1.5, "line spacing (e.g. 2 means double spaced)")
wonb = flag.Bool("whiteonblack", false, "white text on a black background")
)
const title = "Jabberwocky"
var text = []string{
"Twas brillig, and the slithy toves",
"Did gyre and gimble in the wabe;",
"All mimsy were the borogoves,",
"And the mome raths outgrabe.",
"",
"“Beware the Jabberwock, my son!",
"The jaws that bite, the claws that catch!",
"Beware the Jubjub bird, and shun",
"The frumious Bandersnatch!”",
"",
"He took his vorpal sword in hand:",
"Long time the manxome foe he sought—",
"So rested he by the Tumtum tree,",
"And stood awhile in thought.",
"",
"And as in uffish thought he stood,",
"The Jabberwock, with eyes of flame,",
"Came whiffling through the tulgey wood,",
"And burbled as it came!",
"",
"One, two! One, two! and through and through",
"The vorpal blade went snicker-snack!",
"He left it dead, and with its head",
"He went galumphing back.",
"",
"“And hast thou slain the Jabberwock?",
"Come to my arms, my beamish boy!",
"O frabjous day! Callooh! Callay!”",
"He chortled in his joy.",
"",
"Twas brillig, and the slithy toves",
"Did gyre and gimble in the wabe;",
"All mimsy were the borogoves,",
"And the mome raths outgrabe.",
}
func main() {
flag.Parse()
// Read the font data.
fontBytes, err := ioutil.ReadFile(*fontfile)
if err != nil {
log.Println(err)
return
}
f, err := truetype.Parse(fontBytes)
if err != nil {
log.Println(err)
return
}
// Draw the background and the guidelines.
fg, bg := image.Black, image.White
ruler := color.RGBA{0xdd, 0xdd, 0xdd, 0xff}
if *wonb {
fg, bg = image.White, image.Black
ruler = color.RGBA{0x22, 0x22, 0x22, 0xff}
}
const imgW, imgH = 640, 480
rgba := image.NewRGBA(image.Rect(0, 0, imgW, imgH))
draw.Draw(rgba, rgba.Bounds(), bg, image.ZP, draw.Src)
for i := 0; i < 200; i++ {
rgba.Set(10, 10+i, ruler)
rgba.Set(10+i, 10, ruler)
}
// Draw the text.
h := font.HintingNone
switch *hinting {
case "full":
h = font.HintingFull
}
d := &font.Drawer{
Dst: rgba,
Src: fg,
Face: truetype.NewFace(f, &truetype.Options{
Size: *size,
DPI: *dpi,
Hinting: h,
}),
}
y := 10 + int(math.Ceil(*size**dpi/72))
dy := int(math.Ceil(*size * *spacing * *dpi / 72))
d.Dot = fixed.Point26_6{
X: (fixed.I(imgW) - d.MeasureString(title)) / 2,
Y: fixed.I(y),
}
d.DrawString(title)
y += dy
for _, s := range text {
d.Dot = fixed.P(10, y)
d.DrawString(s)
y += dy
}
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, rgba)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

View File

@ -0,0 +1,150 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"bufio"
"flag"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"io/ioutil"
"log"
"os"
"github.com/golang/freetype"
"golang.org/x/image/font"
)
var (
dpi = flag.Float64("dpi", 72, "screen resolution in Dots Per Inch")
fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
hinting = flag.String("hinting", "none", "none | full")
size = flag.Float64("size", 12, "font size in points")
spacing = flag.Float64("spacing", 1.5, "line spacing (e.g. 2 means double spaced)")
wonb = flag.Bool("whiteonblack", false, "white text on a black background")
)
var text = []string{
"Twas brillig, and the slithy toves",
"Did gyre and gimble in the wabe;",
"All mimsy were the borogoves,",
"And the mome raths outgrabe.",
"",
"“Beware the Jabberwock, my son!",
"The jaws that bite, the claws that catch!",
"Beware the Jubjub bird, and shun",
"The frumious Bandersnatch!”",
"",
"He took his vorpal sword in hand:",
"Long time the manxome foe he sought—",
"So rested he by the Tumtum tree,",
"And stood awhile in thought.",
"",
"And as in uffish thought he stood,",
"The Jabberwock, with eyes of flame,",
"Came whiffling through the tulgey wood,",
"And burbled as it came!",
"",
"One, two! One, two! and through and through",
"The vorpal blade went snicker-snack!",
"He left it dead, and with its head",
"He went galumphing back.",
"",
"“And hast thou slain the Jabberwock?",
"Come to my arms, my beamish boy!",
"O frabjous day! Callooh! Callay!”",
"He chortled in his joy.",
"",
"Twas brillig, and the slithy toves",
"Did gyre and gimble in the wabe;",
"All mimsy were the borogoves,",
"And the mome raths outgrabe.",
}
func main() {
flag.Parse()
// Read the font data.
fontBytes, err := ioutil.ReadFile(*fontfile)
if err != nil {
log.Println(err)
return
}
f, err := freetype.ParseFont(fontBytes)
if err != nil {
log.Println(err)
return
}
// Initialize the context.
fg, bg := image.Black, image.White
ruler := color.RGBA{0xdd, 0xdd, 0xdd, 0xff}
if *wonb {
fg, bg = image.White, image.Black
ruler = color.RGBA{0x22, 0x22, 0x22, 0xff}
}
rgba := image.NewRGBA(image.Rect(0, 0, 640, 480))
draw.Draw(rgba, rgba.Bounds(), bg, image.ZP, draw.Src)
c := freetype.NewContext()
c.SetDPI(*dpi)
c.SetFont(f)
c.SetFontSize(*size)
c.SetClip(rgba.Bounds())
c.SetDst(rgba)
c.SetSrc(fg)
switch *hinting {
default:
c.SetHinting(font.HintingNone)
case "full":
c.SetHinting(font.HintingFull)
}
// Draw the guidelines.
for i := 0; i < 200; i++ {
rgba.Set(10, 10+i, ruler)
rgba.Set(10+i, 10, ruler)
}
// Draw the text.
pt := freetype.Pt(10, 10+int(c.PointToFixed(*size)>>6))
for _, s := range text {
_, err = c.DrawString(s, pt)
if err != nil {
log.Println(err)
return
}
pt.Y += c.PointToFixed(*size * *spacing)
}
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, rgba)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

View File

@ -0,0 +1,86 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"bufio"
"fmt"
"image"
"image/draw"
"image/png"
"log"
"os"
"github.com/golang/freetype/raster"
"golang.org/x/image/math/fixed"
)
func p(x, y int) fixed.Point26_6 {
return fixed.Point26_6{
X: fixed.Int26_6(x * 64),
Y: fixed.Int26_6(y * 64),
}
}
func main() {
// Draw a rounded corner that is one pixel wide.
r := raster.NewRasterizer(50, 50)
r.Start(p(5, 5))
r.Add1(p(5, 25))
r.Add2(p(5, 45), p(25, 45))
r.Add1(p(45, 45))
r.Add1(p(45, 44))
r.Add1(p(26, 44))
r.Add2(p(6, 44), p(6, 24))
r.Add1(p(6, 5))
r.Add1(p(5, 5))
// Rasterize that curve multiple times at different gammas.
const (
w = 600
h = 200
)
rgba := image.NewRGBA(image.Rect(0, 0, w, h))
draw.Draw(rgba, image.Rect(0, 0, w, h/2), image.Black, image.ZP, draw.Src)
draw.Draw(rgba, image.Rect(0, h/2, w, h), image.White, image.ZP, draw.Src)
mask := image.NewAlpha(image.Rect(0, 0, 50, 50))
painter := raster.NewAlphaSrcPainter(mask)
gammas := []float64{1.0 / 10.0, 1.0 / 3.0, 1.0 / 2.0, 2.0 / 3.0, 4.0 / 5.0, 1.0, 5.0 / 4.0, 3.0 / 2.0, 2.0, 3.0, 10.0}
for i, g := range gammas {
draw.Draw(mask, mask.Bounds(), image.Transparent, image.ZP, draw.Src)
r.Rasterize(raster.NewGammaCorrectionPainter(painter, g))
x, y := 50*i+25, 25
draw.DrawMask(rgba, image.Rect(x, y, x+50, y+50), image.White, image.ZP, mask, image.ZP, draw.Over)
y += 100
draw.DrawMask(rgba, image.Rect(x, y, x+50, y+50), image.Black, image.ZP, mask, image.ZP, draw.Over)
}
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, rgba)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

View File

@ -0,0 +1,237 @@
// Copyright 2016 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
// Program genbasicfont generates Go source code that imports
// golang.org/x/image/font/basicfont to provide a fixed width font face.
package main
import (
"bytes"
"flag"
"fmt"
"go/format"
"image"
"image/draw"
"io/ioutil"
"log"
"net/http"
"strings"
"unicode"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
var (
fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename or URL of the TTF font")
hinting = flag.String("hinting", "none", "none, vertical or full")
pkg = flag.String("pkg", "example", "the package name for the generated code")
size = flag.Float64("size", 12, "the number of pixels in 1 em")
vr = flag.String("var", "example", "the variable name for the generated code")
)
func loadFontFile() ([]byte, error) {
if strings.HasPrefix(*fontfile, "http://") || strings.HasPrefix(*fontfile, "https://") {
resp, err := http.Get(*fontfile)
if err != nil {
return nil, err
}
defer resp.Body.Close()
return ioutil.ReadAll(resp.Body)
}
return ioutil.ReadFile(*fontfile)
}
func parseHinting(h string) font.Hinting {
switch h {
case "full":
return font.HintingFull
case "vertical":
log.Fatal("TODO: have package truetype implement vertical hinting")
return font.HintingVertical
}
return font.HintingNone
}
func privateUseArea(r rune) bool {
return 0xe000 <= r && r <= 0xf8ff ||
0xf0000 <= r && r <= 0xffffd ||
0x100000 <= r && r <= 0x10fffd
}
func loadRanges(f *truetype.Font) (ret [][2]rune) {
rr := [2]rune{-1, -1}
for r := rune(0); r <= unicode.MaxRune; r++ {
if privateUseArea(r) {
continue
}
if f.Index(r) == 0 {
continue
}
if rr[1] == r {
rr[1] = r + 1
continue
}
if rr[0] != -1 {
ret = append(ret, rr)
}
rr = [2]rune{r, r + 1}
}
if rr[0] != -1 {
ret = append(ret, rr)
}
return ret
}
func emptyCol(m *image.Gray, r image.Rectangle, x int) bool {
for y := r.Min.Y; y < r.Max.Y; y++ {
if m.GrayAt(x, y).Y > 0 {
return false
}
}
return true
}
func emptyRow(m *image.Gray, r image.Rectangle, y int) bool {
for x := r.Min.X; x < r.Max.X; x++ {
if m.GrayAt(x, y).Y > 0 {
return false
}
}
return true
}
func tightBounds(m *image.Gray) (r image.Rectangle) {
r = m.Bounds()
for ; r.Min.Y < r.Max.Y && emptyRow(m, r, r.Min.Y+0); r.Min.Y++ {
}
for ; r.Min.Y < r.Max.Y && emptyRow(m, r, r.Max.Y-1); r.Max.Y-- {
}
for ; r.Min.X < r.Max.X && emptyCol(m, r, r.Min.X+0); r.Min.X++ {
}
for ; r.Min.X < r.Max.X && emptyCol(m, r, r.Max.X-1); r.Max.X-- {
}
return r
}
func printPix(ranges [][2]rune, glyphs map[rune]*image.Gray, b image.Rectangle) []byte {
buf := new(bytes.Buffer)
for _, rr := range ranges {
for r := rr[0]; r < rr[1]; r++ {
m := glyphs[r]
fmt.Fprintf(buf, "// U+%08x '%c'\n", r, r)
for y := b.Min.Y; y < b.Max.Y; y++ {
for x := b.Min.X; x < b.Max.X; x++ {
fmt.Fprintf(buf, "%#02x, ", m.GrayAt(x, y).Y)
}
fmt.Fprintln(buf)
}
fmt.Fprintln(buf)
}
}
return buf.Bytes()
}
func printRanges(ranges [][2]rune) []byte {
buf := new(bytes.Buffer)
offset := 0
for _, rr := range ranges {
fmt.Fprintf(buf, "{'\\U%08x', '\\U%08x', %d},\n", rr[0], rr[1], offset)
offset += int(rr[1] - rr[0])
}
return buf.Bytes()
}
func main() {
flag.Parse()
b, err := loadFontFile()
if err != nil {
log.Fatal(err)
}
f, err := truetype.Parse(b)
if err != nil {
log.Fatal(err)
}
face := truetype.NewFace(f, &truetype.Options{
Size: *size,
Hinting: parseHinting(*hinting),
})
defer face.Close()
fBounds := f.Bounds(fixed.Int26_6(*size * 64))
iBounds := image.Rect(
+fBounds.Min.X.Floor(),
-fBounds.Max.Y.Ceil(),
+fBounds.Max.X.Ceil(),
-fBounds.Min.Y.Floor(),
)
tBounds := image.Rectangle{}
glyphs := map[rune]*image.Gray{}
advance := fixed.Int26_6(-1)
ranges := loadRanges(f)
for _, rr := range ranges {
for r := rr[0]; r < rr[1]; r++ {
dr, mask, maskp, adv, ok := face.Glyph(fixed.Point26_6{}, r)
if !ok {
log.Fatalf("could not load glyph for %U", r)
}
if advance < 0 {
advance = adv
} else if advance != adv {
log.Fatalf("advance was not constant: got %v and %v", advance, adv)
}
dst := image.NewGray(iBounds)
draw.DrawMask(dst, dr, image.White, image.Point{}, mask, maskp, draw.Src)
glyphs[r] = dst
tBounds = tBounds.Union(tightBounds(dst))
}
}
// height is the glyph image height, not the inter-line spacing.
width, height := tBounds.Dx(), tBounds.Dy()
buf := new(bytes.Buffer)
fmt.Fprintf(buf, "// generated by go generate; DO NOT EDIT.\n\npackage %s\n\n", *pkg)
fmt.Fprintf(buf, "import (\n\"image\"\n\n\"golang.org/x/image/font/basicfont\"\n)\n\n")
fmt.Fprintf(buf, "// %s contains %d %d×%d glyphs in %d Pix bytes.\n",
*vr, len(glyphs), width, height, len(glyphs)*width*height)
fmt.Fprintf(buf, `var %s = basicfont.Face{
Advance: %d,
Width: %d,
Height: %d,
Ascent: %d,
Descent: %d,
Left: %d,
Mask: &image.Alpha{
Stride: %d,
Rect: image.Rectangle{Max: image.Point{%d, %d*%d}},
Pix: []byte{
%s
},
},
Ranges: []basicfont.Range{
%s
},
}`, *vr, advance.Ceil(), width, face.Metrics().Height.Ceil(), -tBounds.Min.Y, +tBounds.Max.Y, tBounds.Min.X,
width, width, len(glyphs), height,
printPix(ranges, glyphs, tBounds), printRanges(ranges))
fmted, err := format.Source(buf.Bytes())
if err != nil {
log.Fatalf("format.Source: %v", err)
}
if err := ioutil.WriteFile(*vr+".go", fmted, 0644); err != nil {
log.Fatalf("ioutil.WriteFile: %v", err)
}
}

View File

@ -0,0 +1,185 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"bufio"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"log"
"os"
"github.com/golang/freetype/raster"
"golang.org/x/image/math/fixed"
)
type node struct {
x, y, degree int
}
// These contours "outside" and "inside" are from the 'A' glyph from the Droid
// Serif Regular font.
var outside = []node{
node{414, 489, 1},
node{336, 274, 2},
node{327, 250, 0},
node{322, 226, 2},
node{317, 203, 0},
node{317, 186, 2},
node{317, 134, 0},
node{350, 110, 2},
node{384, 86, 0},
node{453, 86, 1},
node{500, 86, 1},
node{500, 0, 1},
node{0, 0, 1},
node{0, 86, 1},
node{39, 86, 2},
node{69, 86, 0},
node{90, 92, 2},
node{111, 99, 0},
node{128, 117, 2},
node{145, 135, 0},
node{160, 166, 2},
node{176, 197, 0},
node{195, 246, 1},
node{649, 1462, 1},
node{809, 1462, 1},
node{1272, 195, 2},
node{1284, 163, 0},
node{1296, 142, 2},
node{1309, 121, 0},
node{1326, 108, 2},
node{1343, 96, 0},
node{1365, 91, 2},
node{1387, 86, 0},
node{1417, 86, 1},
node{1444, 86, 1},
node{1444, 0, 1},
node{881, 0, 1},
node{881, 86, 1},
node{928, 86, 2},
node{1051, 86, 0},
node{1051, 184, 2},
node{1051, 201, 0},
node{1046, 219, 2},
node{1042, 237, 0},
node{1034, 260, 1},
node{952, 489, 1},
node{414, 489, -1},
}
var inside = []node{
node{686, 1274, 1},
node{453, 592, 1},
node{915, 592, 1},
node{686, 1274, -1},
}
func p(n node) fixed.Point26_6 {
x, y := 20+n.x/4, 380-n.y/4
return fixed.Point26_6{
X: fixed.Int26_6(x << 6),
Y: fixed.Int26_6(y << 6),
}
}
func contour(r *raster.Rasterizer, ns []node) {
if len(ns) == 0 {
return
}
i := 0
r.Start(p(ns[i]))
for {
switch ns[i].degree {
case -1:
// -1 signifies end-of-contour.
return
case 1:
i += 1
r.Add1(p(ns[i]))
case 2:
i += 2
r.Add2(p(ns[i-1]), p(ns[i]))
default:
panic("bad degree")
}
}
}
func showNodes(m *image.RGBA, ns []node) {
for _, n := range ns {
p := p(n)
x, y := int(p.X)/64, int(p.Y)/64
if !(image.Point{x, y}).In(m.Bounds()) {
continue
}
var c color.Color
switch n.degree {
case 0:
c = color.RGBA{0, 255, 255, 255}
case 1:
c = color.RGBA{255, 0, 0, 255}
case 2:
c = color.RGBA{255, 0, 0, 255}
}
if c != nil {
m.Set(x, y, c)
}
}
}
func main() {
// Rasterize the contours to a mask image.
const (
w = 400
h = 400
)
r := raster.NewRasterizer(w, h)
contour(r, outside)
contour(r, inside)
mask := image.NewAlpha(image.Rect(0, 0, w, h))
p := raster.NewAlphaSrcPainter(mask)
r.Rasterize(p)
// Draw the mask image (in gray) onto an RGBA image.
rgba := image.NewRGBA(image.Rect(0, 0, w, h))
gray := image.NewUniform(color.Alpha{0x1f})
draw.Draw(rgba, rgba.Bounds(), image.Black, image.ZP, draw.Src)
draw.DrawMask(rgba, rgba.Bounds(), gray, image.ZP, mask, image.ZP, draw.Over)
showNodes(rgba, outside)
showNodes(rgba, inside)
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, rgba)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

110
vendor/github.com/golang/freetype/example/round/main.go generated vendored Normal file
View File

@ -0,0 +1,110 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
// This program visualizes the quadratic approximation to the circle, used to
// implement round joins when stroking paths. The approximation is used in the
// stroking code for arcs between 0 and 45 degrees, but is visualized here
// between 0 and 90 degrees. The discrepancy between the approximation and the
// true circle is clearly visible at angles above 65 degrees.
package main
import (
"bufio"
"fmt"
"image"
"image/color"
"image/draw"
"image/png"
"log"
"math"
"os"
"github.com/golang/freetype/raster"
"golang.org/x/image/math/fixed"
)
// pDot returns the dot product p·q.
func pDot(p, q fixed.Point26_6) fixed.Int52_12 {
px, py := int64(p.X), int64(p.Y)
qx, qy := int64(q.X), int64(q.Y)
return fixed.Int52_12(px*qx + py*qy)
}
func main() {
const (
n = 17
r = 64 * 80
)
s := fixed.Int26_6(r * math.Sqrt(2) / 2)
t := fixed.Int26_6(r * math.Tan(math.Pi/8))
m := image.NewRGBA(image.Rect(0, 0, 800, 600))
draw.Draw(m, m.Bounds(), image.NewUniform(color.RGBA{63, 63, 63, 255}), image.ZP, draw.Src)
mp := raster.NewRGBAPainter(m)
mp.SetColor(image.Black)
z := raster.NewRasterizer(800, 600)
for i := 0; i < n; i++ {
cx := fixed.Int26_6(6400 + 12800*(i%4))
cy := fixed.Int26_6(640 + 8000*(i/4))
c := fixed.Point26_6{X: cx, Y: cy}
theta := math.Pi * (0.5 + 0.5*float64(i)/(n-1))
dx := fixed.Int26_6(r * math.Cos(theta))
dy := fixed.Int26_6(r * math.Sin(theta))
d := fixed.Point26_6{X: dx, Y: dy}
// Draw a quarter-circle approximated by two quadratic segments,
// with each segment spanning 45 degrees.
z.Start(c)
z.Add1(c.Add(fixed.Point26_6{X: r, Y: 0}))
z.Add2(c.Add(fixed.Point26_6{X: r, Y: t}), c.Add(fixed.Point26_6{X: s, Y: s}))
z.Add2(c.Add(fixed.Point26_6{X: t, Y: r}), c.Add(fixed.Point26_6{X: 0, Y: r}))
// Add another quadratic segment whose angle ranges between 0 and 90
// degrees. For an explanation of the magic constants 128, 150, 181 and
// 256, read the comments in the freetype/raster package.
dot := 256 * pDot(d, fixed.Point26_6{X: 0, Y: r}) / (r * r)
multiple := fixed.Int26_6(150-(150-128)*(dot-181)/(256-181)) >> 2
z.Add2(c.Add(fixed.Point26_6{X: dx, Y: r + dy}.Mul(multiple)), c.Add(d))
// Close the curve.
z.Add1(c)
}
z.Rasterize(mp)
for i := 0; i < n; i++ {
cx := fixed.Int26_6(6400 + 12800*(i%4))
cy := fixed.Int26_6(640 + 8000*(i/4))
for j := 0; j < n; j++ {
theta := math.Pi * float64(j) / (n - 1)
dx := fixed.Int26_6(r * math.Cos(theta))
dy := fixed.Int26_6(r * math.Sin(theta))
m.Set(int((cx+dx)/64), int((cy+dy)/64), color.RGBA{255, 255, 0, 255})
}
}
// Save that RGBA image to disk.
outFile, err := os.Create("out.png")
if err != nil {
log.Println(err)
os.Exit(1)
}
defer outFile.Close()
b := bufio.NewWriter(outFile)
err = png.Encode(b, m)
if err != nil {
log.Println(err)
os.Exit(1)
}
err = b.Flush()
if err != nil {
log.Println(err)
os.Exit(1)
}
fmt.Println("Wrote out.png OK.")
}

View File

@ -0,0 +1,89 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// +build example
//
// This build tag means that "go install github.com/golang/freetype/..."
// doesn't install this example program. Use "go run main.go" to run it or "go
// install -tags=example" to install it.
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
var fontfile = flag.String("fontfile", "../../testdata/luxisr.ttf", "filename of the ttf font")
func printBounds(b fixed.Rectangle26_6) {
fmt.Printf("Min.X:%d Min.Y:%d Max.X:%d Max.Y:%d\n", b.Min.X, b.Min.Y, b.Max.X, b.Max.Y)
}
func printGlyph(g *truetype.GlyphBuf) {
printBounds(g.Bounds)
fmt.Print("Points:\n---\n")
e := 0
for i, p := range g.Points {
fmt.Printf("%4d, %4d", p.X, p.Y)
if p.Flags&0x01 != 0 {
fmt.Print(" on\n")
} else {
fmt.Print(" off\n")
}
if i+1 == int(g.Ends[e]) {
fmt.Print("---\n")
e++
}
}
}
func main() {
flag.Parse()
fmt.Printf("Loading fontfile %q\n", *fontfile)
b, err := ioutil.ReadFile(*fontfile)
if err != nil {
log.Println(err)
return
}
f, err := truetype.Parse(b)
if err != nil {
log.Println(err)
return
}
fupe := fixed.Int26_6(f.FUnitsPerEm())
printBounds(f.Bounds(fupe))
fmt.Printf("FUnitsPerEm:%d\n\n", fupe)
c0, c1 := 'A', 'V'
i0 := f.Index(c0)
hm := f.HMetric(fupe, i0)
g := &truetype.GlyphBuf{}
err = g.Load(f, fupe, i0, font.HintingNone)
if err != nil {
log.Println(err)
return
}
fmt.Printf("'%c' glyph\n", c0)
fmt.Printf("AdvanceWidth:%d LeftSideBearing:%d\n", hm.AdvanceWidth, hm.LeftSideBearing)
printGlyph(g)
i1 := f.Index(c1)
fmt.Printf("\n'%c', '%c' Kern:%d\n", c0, c1, f.Kern(fupe, i0, i1))
fmt.Printf("\nThe numbers above are in FUnits.\n" +
"The numbers below are in 26.6 fixed point pixels, at 12pt and 72dpi.\n\n")
a := truetype.NewFace(f, &truetype.Options{
Size: 12,
DPI: 72,
})
fmt.Printf("%#v\n", a.Metrics())
}

341
vendor/github.com/golang/freetype/freetype.go generated vendored Normal file
View File

@ -0,0 +1,341 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// The freetype package provides a convenient API to draw text onto an image.
// Use the freetype/raster and freetype/truetype packages for lower level
// control over rasterization and TrueType parsing.
package freetype // import "github.com/golang/freetype"
import (
"errors"
"image"
"image/draw"
"github.com/golang/freetype/raster"
"github.com/golang/freetype/truetype"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
// These constants determine the size of the glyph cache. The cache is keyed
// primarily by the glyph index modulo nGlyphs, and secondarily by sub-pixel
// position for the mask image. Sub-pixel positions are quantized to
// nXFractions possible values in both the x and y directions.
const (
nGlyphs = 256
nXFractions = 4
nYFractions = 1
)
// An entry in the glyph cache is keyed explicitly by the glyph index and
// implicitly by the quantized x and y fractional offset. It maps to a mask
// image and an offset.
type cacheEntry struct {
valid bool
glyph truetype.Index
advanceWidth fixed.Int26_6
mask *image.Alpha
offset image.Point
}
// ParseFont just calls the Parse function from the freetype/truetype package.
// It is provided here so that code that imports this package doesn't need
// to also include the freetype/truetype package.
func ParseFont(b []byte) (*truetype.Font, error) {
return truetype.Parse(b)
}
// Pt converts from a co-ordinate pair measured in pixels to a fixed.Point26_6
// co-ordinate pair measured in fixed.Int26_6 units.
func Pt(x, y int) fixed.Point26_6 {
return fixed.Point26_6{
X: fixed.Int26_6(x << 6),
Y: fixed.Int26_6(y << 6),
}
}
// A Context holds the state for drawing text in a given font and size.
type Context struct {
r *raster.Rasterizer
f *truetype.Font
glyphBuf truetype.GlyphBuf
// clip is the clip rectangle for drawing.
clip image.Rectangle
// dst and src are the destination and source images for drawing.
dst draw.Image
src image.Image
// fontSize and dpi are used to calculate scale. scale is the number of
// 26.6 fixed point units in 1 em. hinting is the hinting policy.
fontSize, dpi float64
scale fixed.Int26_6
hinting font.Hinting
// cache is the glyph cache.
cache [nGlyphs * nXFractions * nYFractions]cacheEntry
}
// PointToFixed converts the given number of points (as in "a 12 point font")
// into a 26.6 fixed point number of pixels.
func (c *Context) PointToFixed(x float64) fixed.Int26_6 {
return fixed.Int26_6(x * float64(c.dpi) * (64.0 / 72.0))
}
// drawContour draws the given closed contour with the given offset.
func (c *Context) drawContour(ps []truetype.Point, dx, dy fixed.Int26_6) {
if len(ps) == 0 {
return
}
// The low bit of each point's Flags value is whether the point is on the
// curve. Truetype fonts only have quadratic Bézier curves, not cubics.
// Thus, two consecutive off-curve points imply an on-curve point in the
// middle of those two.
//
// See http://chanae.walon.org/pub/ttf/ttf_glyphs.htm for more details.
// ps[0] is a truetype.Point measured in FUnits and positive Y going
// upwards. start is the same thing measured in fixed point units and
// positive Y going downwards, and offset by (dx, dy).
start := fixed.Point26_6{
X: dx + ps[0].X,
Y: dy - ps[0].Y,
}
others := []truetype.Point(nil)
if ps[0].Flags&0x01 != 0 {
others = ps[1:]
} else {
last := fixed.Point26_6{
X: dx + ps[len(ps)-1].X,
Y: dy - ps[len(ps)-1].Y,
}
if ps[len(ps)-1].Flags&0x01 != 0 {
start = last
others = ps[:len(ps)-1]
} else {
start = fixed.Point26_6{
X: (start.X + last.X) / 2,
Y: (start.Y + last.Y) / 2,
}
others = ps
}
}
c.r.Start(start)
q0, on0 := start, true
for _, p := range others {
q := fixed.Point26_6{
X: dx + p.X,
Y: dy - p.Y,
}
on := p.Flags&0x01 != 0
if on {
if on0 {
c.r.Add1(q)
} else {
c.r.Add2(q0, q)
}
} else {
if on0 {
// No-op.
} else {
mid := fixed.Point26_6{
X: (q0.X + q.X) / 2,
Y: (q0.Y + q.Y) / 2,
}
c.r.Add2(q0, mid)
}
}
q0, on0 = q, on
}
// Close the curve.
if on0 {
c.r.Add1(start)
} else {
c.r.Add2(q0, start)
}
}
// rasterize returns the advance width, glyph mask and integer-pixel offset
// to render the given glyph at the given sub-pixel offsets.
// The 26.6 fixed point arguments fx and fy must be in the range [0, 1).
func (c *Context) rasterize(glyph truetype.Index, fx, fy fixed.Int26_6) (
fixed.Int26_6, *image.Alpha, image.Point, error) {
if err := c.glyphBuf.Load(c.f, c.scale, glyph, c.hinting); err != nil {
return 0, nil, image.Point{}, err
}
// Calculate the integer-pixel bounds for the glyph.
xmin := int(fx+c.glyphBuf.Bounds.Min.X) >> 6
ymin := int(fy-c.glyphBuf.Bounds.Max.Y) >> 6
xmax := int(fx+c.glyphBuf.Bounds.Max.X+0x3f) >> 6
ymax := int(fy-c.glyphBuf.Bounds.Min.Y+0x3f) >> 6
if xmin > xmax || ymin > ymax {
return 0, nil, image.Point{}, errors.New("freetype: negative sized glyph")
}
// A TrueType's glyph's nodes can have negative co-ordinates, but the
// rasterizer clips anything left of x=0 or above y=0. xmin and ymin are
// the pixel offsets, based on the font's FUnit metrics, that let a
// negative co-ordinate in TrueType space be non-negative in rasterizer
// space. xmin and ymin are typically <= 0.
fx -= fixed.Int26_6(xmin << 6)
fy -= fixed.Int26_6(ymin << 6)
// Rasterize the glyph's vectors.
c.r.Clear()
e0 := 0
for _, e1 := range c.glyphBuf.Ends {
c.drawContour(c.glyphBuf.Points[e0:e1], fx, fy)
e0 = e1
}
a := image.NewAlpha(image.Rect(0, 0, xmax-xmin, ymax-ymin))
c.r.Rasterize(raster.NewAlphaSrcPainter(a))
return c.glyphBuf.AdvanceWidth, a, image.Point{xmin, ymin}, nil
}
// glyph returns the advance width, glyph mask and integer-pixel offset to
// render the given glyph at the given sub-pixel point. It is a cache for the
// rasterize method. Unlike rasterize, p's co-ordinates do not have to be in
// the range [0, 1).
func (c *Context) glyph(glyph truetype.Index, p fixed.Point26_6) (
fixed.Int26_6, *image.Alpha, image.Point, error) {
// Split p.X and p.Y into their integer and fractional parts.
ix, fx := int(p.X>>6), p.X&0x3f
iy, fy := int(p.Y>>6), p.Y&0x3f
// Calculate the index t into the cache array.
tg := int(glyph) % nGlyphs
tx := int(fx) / (64 / nXFractions)
ty := int(fy) / (64 / nYFractions)
t := ((tg*nXFractions)+tx)*nYFractions + ty
// Check for a cache hit.
if e := c.cache[t]; e.valid && e.glyph == glyph {
return e.advanceWidth, e.mask, e.offset.Add(image.Point{ix, iy}), nil
}
// Rasterize the glyph and put the result into the cache.
advanceWidth, mask, offset, err := c.rasterize(glyph, fx, fy)
if err != nil {
return 0, nil, image.Point{}, err
}
c.cache[t] = cacheEntry{true, glyph, advanceWidth, mask, offset}
return advanceWidth, mask, offset.Add(image.Point{ix, iy}), nil
}
// DrawString draws s at p and returns p advanced by the text extent. The text
// is placed so that the left edge of the em square of the first character of s
// and the baseline intersect at p. The majority of the affected pixels will be
// above and to the right of the point, but some may be below or to the left.
// For example, drawing a string that starts with a 'J' in an italic font may
// affect pixels below and left of the point.
//
// p is a fixed.Point26_6 and can therefore represent sub-pixel positions.
func (c *Context) DrawString(s string, p fixed.Point26_6) (fixed.Point26_6, error) {
if c.f == nil {
return fixed.Point26_6{}, errors.New("freetype: DrawText called with a nil font")
}
prev, hasPrev := truetype.Index(0), false
for _, rune := range s {
index := c.f.Index(rune)
if hasPrev {
kern := c.f.Kern(c.scale, prev, index)
if c.hinting != font.HintingNone {
kern = (kern + 32) &^ 63
}
p.X += kern
}
advanceWidth, mask, offset, err := c.glyph(index, p)
if err != nil {
return fixed.Point26_6{}, err
}
p.X += advanceWidth
glyphRect := mask.Bounds().Add(offset)
dr := c.clip.Intersect(glyphRect)
if !dr.Empty() {
mp := image.Point{0, dr.Min.Y - glyphRect.Min.Y}
draw.DrawMask(c.dst, dr, c.src, image.ZP, mask, mp, draw.Over)
}
prev, hasPrev = index, true
}
return p, nil
}
// recalc recalculates scale and bounds values from the font size, screen
// resolution and font metrics, and invalidates the glyph cache.
func (c *Context) recalc() {
c.scale = fixed.Int26_6(c.fontSize * c.dpi * (64.0 / 72.0))
if c.f == nil {
c.r.SetBounds(0, 0)
} else {
// Set the rasterizer's bounds to be big enough to handle the largest glyph.
b := c.f.Bounds(c.scale)
xmin := +int(b.Min.X) >> 6
ymin := -int(b.Max.Y) >> 6
xmax := +int(b.Max.X+63) >> 6
ymax := -int(b.Min.Y-63) >> 6
c.r.SetBounds(xmax-xmin, ymax-ymin)
}
for i := range c.cache {
c.cache[i] = cacheEntry{}
}
}
// SetDPI sets the screen resolution in dots per inch.
func (c *Context) SetDPI(dpi float64) {
if c.dpi == dpi {
return
}
c.dpi = dpi
c.recalc()
}
// SetFont sets the font used to draw text.
func (c *Context) SetFont(f *truetype.Font) {
if c.f == f {
return
}
c.f = f
c.recalc()
}
// SetFontSize sets the font size in points (as in "a 12 point font").
func (c *Context) SetFontSize(fontSize float64) {
if c.fontSize == fontSize {
return
}
c.fontSize = fontSize
c.recalc()
}
// SetHinting sets the hinting policy.
func (c *Context) SetHinting(hinting font.Hinting) {
c.hinting = hinting
for i := range c.cache {
c.cache[i] = cacheEntry{}
}
}
// SetDst sets the destination image for draw operations.
func (c *Context) SetDst(dst draw.Image) {
c.dst = dst
}
// SetSrc sets the source image for draw operations. This is typically an
// image.Uniform.
func (c *Context) SetSrc(src image.Image) {
c.src = src
}
// SetClip sets the clip rectangle for drawing.
func (c *Context) SetClip(clip image.Rectangle) {
c.clip = clip
}
// TODO(nigeltao): implement Context.SetGamma.
// NewContext creates a new Context.
func NewContext() *Context {
return &Context{
r: raster.NewRasterizer(0, 0),
fontSize: 12,
dpi: 72,
scale: 12 << 6,
}
}

59
vendor/github.com/golang/freetype/freetype_test.go generated vendored Normal file
View File

@ -0,0 +1,59 @@
// Copyright 2012 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package freetype
import (
"image"
"image/draw"
"io/ioutil"
"runtime"
"strings"
"testing"
)
func BenchmarkDrawString(b *testing.B) {
data, err := ioutil.ReadFile("licenses/gpl.txt")
if err != nil {
b.Fatal(err)
}
lines := strings.Split(string(data), "\n")
data, err = ioutil.ReadFile("testdata/luxisr.ttf")
if err != nil {
b.Fatal(err)
}
f, err := ParseFont(data)
if err != nil {
b.Fatal(err)
}
dst := image.NewRGBA(image.Rect(0, 0, 800, 600))
draw.Draw(dst, dst.Bounds(), image.White, image.ZP, draw.Src)
c := NewContext()
c.SetDst(dst)
c.SetClip(dst.Bounds())
c.SetSrc(image.Black)
c.SetFont(f)
var ms runtime.MemStats
runtime.ReadMemStats(&ms)
mallocs := ms.Mallocs
b.ResetTimer()
for i := 0; i < b.N; i++ {
for j, line := range lines {
_, err := c.DrawString(line, Pt(0, (j*16)%600))
if err != nil {
b.Fatal(err)
}
}
}
b.StopTimer()
runtime.ReadMemStats(&ms)
mallocs = ms.Mallocs - mallocs
b.Logf("%d iterations, %d mallocs per iteration\n", b.N, int(mallocs)/b.N)
}

169
vendor/github.com/golang/freetype/licenses/ftl.txt generated vendored Normal file
View File

@ -0,0 +1,169 @@
The FreeType Project LICENSE
----------------------------
2006-Jan-27
Copyright 1996-2002, 2006 by
David Turner, Robert Wilhelm, and Werner Lemberg
Introduction
============
The FreeType Project is distributed in several archive packages;
some of them may contain, in addition to the FreeType font engine,
various tools and contributions which rely on, or relate to, the
FreeType Project.
This license applies to all files found in such packages, and
which do not fall under their own explicit license. The license
affects thus the FreeType font engine, the test programs,
documentation and makefiles, at the very least.
This license was inspired by the BSD, Artistic, and IJG
(Independent JPEG Group) licenses, which all encourage inclusion
and use of free software in commercial and freeware products
alike. As a consequence, its main points are that:
o We don't promise that this software works. However, we will be
interested in any kind of bug reports. (`as is' distribution)
o You can use this software for whatever you want, in parts or
full form, without having to pay us. (`royalty-free' usage)
o You may not pretend that you wrote this software. If you use
it, or only parts of it, in a program, you must acknowledge
somewhere in your documentation that you have used the
FreeType code. (`credits')
We specifically permit and encourage the inclusion of this
software, with or without modifications, in commercial products.
We disclaim all warranties covering The FreeType Project and
assume no liability related to The FreeType Project.
Finally, many people asked us for a preferred form for a
credit/disclaimer to use in compliance with this license. We thus
encourage you to use the following text:
"""
Portions of this software are copyright © <year> The FreeType
Project (www.freetype.org). All rights reserved.
"""
Please replace <year> with the value from the FreeType version you
actually use.
Legal Terms
===========
0. Definitions
--------------
Throughout this license, the terms `package', `FreeType Project',
and `FreeType archive' refer to the set of files originally
distributed by the authors (David Turner, Robert Wilhelm, and
Werner Lemberg) as the `FreeType Project', be they named as alpha,
beta or final release.
`You' refers to the licensee, or person using the project, where
`using' is a generic term including compiling the project's source
code as well as linking it to form a `program' or `executable'.
This program is referred to as `a program using the FreeType
engine'.
This license applies to all files distributed in the original
FreeType Project, including all source code, binaries and
documentation, unless otherwise stated in the file in its
original, unmodified form as distributed in the original archive.
If you are unsure whether or not a particular file is covered by
this license, you must contact us to verify this.
The FreeType Project is copyright (C) 1996-2000 by David Turner,
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
specified below.
1. No Warranty
--------------
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
USE, OF THE FREETYPE PROJECT.
2. Redistribution
-----------------
This license grants a worldwide, royalty-free, perpetual and
irrevocable right and license to use, execute, perform, compile,
display, copy, create derivative works of, distribute and
sublicense the FreeType Project (in both source and object code
forms) and derivative works thereof for any purpose; and to
authorize others to exercise some or all of the rights granted
herein, subject to the following conditions:
o Redistribution of source code must retain this license file
(`FTL.TXT') unaltered; any additions, deletions or changes to
the original files must be clearly indicated in accompanying
documentation. The copyright notices of the unaltered,
original files must be preserved in all copies of source
files.
o Redistribution in binary form must provide a disclaimer that
states that the software is based in part of the work of the
FreeType Team, in the distribution documentation. We also
encourage you to put an URL to the FreeType web page in your
documentation, though this isn't mandatory.
These conditions apply to any software derived from or based on
the FreeType Project, not just the unmodified files. If you use
our work, you must acknowledge us. However, no fee need be paid
to us.
3. Advertising
--------------
Neither the FreeType authors and contributors nor you shall use
the name of the other for commercial, advertising, or promotional
purposes without specific prior written permission.
We suggest, but do not require, that you use one or more of the
following phrases to refer to this software in your documentation
or advertising materials: `FreeType Project', `FreeType Engine',
`FreeType library', or `FreeType Distribution'.
As you have not signed this license, you are not required to
accept it. However, as the FreeType Project is copyrighted
material, only this license, or another one contracted with the
authors, grants you the right to use, distribute, and modify it.
Therefore, by using, distributing, or modifying the FreeType
Project, you indicate that you understand and accept all the terms
of this license.
4. Contacts
-----------
There are two mailing lists related to FreeType:
o freetype@nongnu.org
Discusses general use and applications of FreeType, as well as
future and wanted additions to the library and distribution.
If you are looking for support, start in this list if you
haven't found anything to help you in the documentation.
o freetype-devel@nongnu.org
Discusses bugs, as well as engine internals, design issues,
specific licenses, porting, etc.
Our home page can be found at
http://www.freetype.org
--- end of FTL.TXT ---

340
vendor/github.com/golang/freetype/licenses/gpl.txt generated vendored Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

245
vendor/github.com/golang/freetype/raster/geom.go generated vendored Normal file
View File

@ -0,0 +1,245 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package raster
import (
"fmt"
"math"
"golang.org/x/image/math/fixed"
)
// maxAbs returns the maximum of abs(a) and abs(b).
func maxAbs(a, b fixed.Int26_6) fixed.Int26_6 {
if a < 0 {
a = -a
}
if b < 0 {
b = -b
}
if a < b {
return b
}
return a
}
// pNeg returns the vector -p, or equivalently p rotated by 180 degrees.
func pNeg(p fixed.Point26_6) fixed.Point26_6 {
return fixed.Point26_6{-p.X, -p.Y}
}
// pDot returns the dot product p·q.
func pDot(p fixed.Point26_6, q fixed.Point26_6) fixed.Int52_12 {
px, py := int64(p.X), int64(p.Y)
qx, qy := int64(q.X), int64(q.Y)
return fixed.Int52_12(px*qx + py*qy)
}
// pLen returns the length of the vector p.
func pLen(p fixed.Point26_6) fixed.Int26_6 {
// TODO(nigeltao): use fixed point math.
x := float64(p.X)
y := float64(p.Y)
return fixed.Int26_6(math.Sqrt(x*x + y*y))
}
// pNorm returns the vector p normalized to the given length, or zero if p is
// degenerate.
func pNorm(p fixed.Point26_6, length fixed.Int26_6) fixed.Point26_6 {
d := pLen(p)
if d == 0 {
return fixed.Point26_6{}
}
s, t := int64(length), int64(d)
x := int64(p.X) * s / t
y := int64(p.Y) * s / t
return fixed.Point26_6{fixed.Int26_6(x), fixed.Int26_6(y)}
}
// pRot45CW returns the vector p rotated clockwise by 45 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot45CW is {1/√2, 1/√2}.
func pRot45CW(p fixed.Point26_6) fixed.Point26_6 {
// 181/256 is approximately 1/√2, or sin(π/4).
px, py := int64(p.X), int64(p.Y)
qx := (+px - py) * 181 / 256
qy := (+px + py) * 181 / 256
return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)}
}
// pRot90CW returns the vector p rotated clockwise by 90 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot90CW is {0, 1}.
func pRot90CW(p fixed.Point26_6) fixed.Point26_6 {
return fixed.Point26_6{-p.Y, p.X}
}
// pRot135CW returns the vector p rotated clockwise by 135 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot135CW is {-1/√2, 1/√2}.
func pRot135CW(p fixed.Point26_6) fixed.Point26_6 {
// 181/256 is approximately 1/√2, or sin(π/4).
px, py := int64(p.X), int64(p.Y)
qx := (-px - py) * 181 / 256
qy := (+px - py) * 181 / 256
return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)}
}
// pRot45CCW returns the vector p rotated counter-clockwise by 45 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot45CCW is {1/√2, -1/√2}.
func pRot45CCW(p fixed.Point26_6) fixed.Point26_6 {
// 181/256 is approximately 1/√2, or sin(π/4).
px, py := int64(p.X), int64(p.Y)
qx := (+px + py) * 181 / 256
qy := (-px + py) * 181 / 256
return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)}
}
// pRot90CCW returns the vector p rotated counter-clockwise by 90 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot90CCW is {0, -1}.
func pRot90CCW(p fixed.Point26_6) fixed.Point26_6 {
return fixed.Point26_6{p.Y, -p.X}
}
// pRot135CCW returns the vector p rotated counter-clockwise by 135 degrees.
//
// Note that the Y-axis grows downwards, so {1, 0}.Rot135CCW is {-1/√2, -1/√2}.
func pRot135CCW(p fixed.Point26_6) fixed.Point26_6 {
// 181/256 is approximately 1/√2, or sin(π/4).
px, py := int64(p.X), int64(p.Y)
qx := (-px + py) * 181 / 256
qy := (-px - py) * 181 / 256
return fixed.Point26_6{fixed.Int26_6(qx), fixed.Int26_6(qy)}
}
// An Adder accumulates points on a curve.
type Adder interface {
// Start starts a new curve at the given point.
Start(a fixed.Point26_6)
// Add1 adds a linear segment to the current curve.
Add1(b fixed.Point26_6)
// Add2 adds a quadratic segment to the current curve.
Add2(b, c fixed.Point26_6)
// Add3 adds a cubic segment to the current curve.
Add3(b, c, d fixed.Point26_6)
}
// A Path is a sequence of curves, and a curve is a start point followed by a
// sequence of linear, quadratic or cubic segments.
type Path []fixed.Int26_6
// String returns a human-readable representation of a Path.
func (p Path) String() string {
s := ""
for i := 0; i < len(p); {
if i != 0 {
s += " "
}
switch p[i] {
case 0:
s += "S0" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3]))
i += 4
case 1:
s += "A1" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+3]))
i += 4
case 2:
s += "A2" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+5]))
i += 6
case 3:
s += "A3" + fmt.Sprint([]fixed.Int26_6(p[i+1:i+7]))
i += 8
default:
panic("freetype/raster: bad path")
}
}
return s
}
// Clear cancels any previous calls to p.Start or p.AddXxx.
func (p *Path) Clear() {
*p = (*p)[:0]
}
// Start starts a new curve at the given point.
func (p *Path) Start(a fixed.Point26_6) {
*p = append(*p, 0, a.X, a.Y, 0)
}
// Add1 adds a linear segment to the current curve.
func (p *Path) Add1(b fixed.Point26_6) {
*p = append(*p, 1, b.X, b.Y, 1)
}
// Add2 adds a quadratic segment to the current curve.
func (p *Path) Add2(b, c fixed.Point26_6) {
*p = append(*p, 2, b.X, b.Y, c.X, c.Y, 2)
}
// Add3 adds a cubic segment to the current curve.
func (p *Path) Add3(b, c, d fixed.Point26_6) {
*p = append(*p, 3, b.X, b.Y, c.X, c.Y, d.X, d.Y, 3)
}
// AddPath adds the Path q to p.
func (p *Path) AddPath(q Path) {
*p = append(*p, q...)
}
// AddStroke adds a stroked Path.
func (p *Path) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) {
Stroke(p, q, width, cr, jr)
}
// firstPoint returns the first point in a non-empty Path.
func (p Path) firstPoint() fixed.Point26_6 {
return fixed.Point26_6{p[1], p[2]}
}
// lastPoint returns the last point in a non-empty Path.
func (p Path) lastPoint() fixed.Point26_6 {
return fixed.Point26_6{p[len(p)-3], p[len(p)-2]}
}
// addPathReversed adds q reversed to p.
// For example, if q consists of a linear segment from A to B followed by a
// quadratic segment from B to C to D, then the values of q looks like:
// index: 01234567890123
// value: 0AA01BB12CCDD2
// So, when adding q backwards to p, we want to Add2(C, B) followed by Add1(A).
func addPathReversed(p Adder, q Path) {
if len(q) == 0 {
return
}
i := len(q) - 1
for {
switch q[i] {
case 0:
return
case 1:
i -= 4
p.Add1(
fixed.Point26_6{q[i-2], q[i-1]},
)
case 2:
i -= 6
p.Add2(
fixed.Point26_6{q[i+2], q[i+3]},
fixed.Point26_6{q[i-2], q[i-1]},
)
case 3:
i -= 8
p.Add3(
fixed.Point26_6{q[i+4], q[i+5]},
fixed.Point26_6{q[i+2], q[i+3]},
fixed.Point26_6{q[i-2], q[i-1]},
)
default:
panic("freetype/raster: bad path")
}
}
}

287
vendor/github.com/golang/freetype/raster/paint.go generated vendored Normal file
View File

@ -0,0 +1,287 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package raster
import (
"image"
"image/color"
"image/draw"
"math"
)
// A Span is a horizontal segment of pixels with constant alpha. X0 is an
// inclusive bound and X1 is exclusive, the same as for slices. A fully opaque
// Span has Alpha == 0xffff.
type Span struct {
Y, X0, X1 int
Alpha uint32
}
// A Painter knows how to paint a batch of Spans. Rasterization may involve
// Painting multiple batches, and done will be true for the final batch. The
// Spans' Y values are monotonically increasing during a rasterization. Paint
// may use all of ss as scratch space during the call.
type Painter interface {
Paint(ss []Span, done bool)
}
// The PainterFunc type adapts an ordinary function to the Painter interface.
type PainterFunc func(ss []Span, done bool)
// Paint just delegates the call to f.
func (f PainterFunc) Paint(ss []Span, done bool) { f(ss, done) }
// An AlphaOverPainter is a Painter that paints Spans onto a *image.Alpha using
// the Over Porter-Duff composition operator.
type AlphaOverPainter struct {
Image *image.Alpha
}
// Paint satisfies the Painter interface.
func (r AlphaOverPainter) Paint(ss []Span, done bool) {
b := r.Image.Bounds()
for _, s := range ss {
if s.Y < b.Min.Y {
continue
}
if s.Y >= b.Max.Y {
return
}
if s.X0 < b.Min.X {
s.X0 = b.Min.X
}
if s.X1 > b.Max.X {
s.X1 = b.Max.X
}
if s.X0 >= s.X1 {
continue
}
base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X
p := r.Image.Pix[base+s.X0 : base+s.X1]
a := int(s.Alpha >> 8)
for i, c := range p {
v := int(c)
p[i] = uint8((v*255 + (255-v)*a) / 255)
}
}
}
// NewAlphaOverPainter creates a new AlphaOverPainter for the given image.
func NewAlphaOverPainter(m *image.Alpha) AlphaOverPainter {
return AlphaOverPainter{m}
}
// An AlphaSrcPainter is a Painter that paints Spans onto a *image.Alpha using
// the Src Porter-Duff composition operator.
type AlphaSrcPainter struct {
Image *image.Alpha
}
// Paint satisfies the Painter interface.
func (r AlphaSrcPainter) Paint(ss []Span, done bool) {
b := r.Image.Bounds()
for _, s := range ss {
if s.Y < b.Min.Y {
continue
}
if s.Y >= b.Max.Y {
return
}
if s.X0 < b.Min.X {
s.X0 = b.Min.X
}
if s.X1 > b.Max.X {
s.X1 = b.Max.X
}
if s.X0 >= s.X1 {
continue
}
base := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride - r.Image.Rect.Min.X
p := r.Image.Pix[base+s.X0 : base+s.X1]
color := uint8(s.Alpha >> 8)
for i := range p {
p[i] = color
}
}
}
// NewAlphaSrcPainter creates a new AlphaSrcPainter for the given image.
func NewAlphaSrcPainter(m *image.Alpha) AlphaSrcPainter {
return AlphaSrcPainter{m}
}
// An RGBAPainter is a Painter that paints Spans onto a *image.RGBA.
type RGBAPainter struct {
// Image is the image to compose onto.
Image *image.RGBA
// Op is the Porter-Duff composition operator.
Op draw.Op
// cr, cg, cb and ca are the 16-bit color to paint the spans.
cr, cg, cb, ca uint32
}
// Paint satisfies the Painter interface.
func (r *RGBAPainter) Paint(ss []Span, done bool) {
b := r.Image.Bounds()
for _, s := range ss {
if s.Y < b.Min.Y {
continue
}
if s.Y >= b.Max.Y {
return
}
if s.X0 < b.Min.X {
s.X0 = b.Min.X
}
if s.X1 > b.Max.X {
s.X1 = b.Max.X
}
if s.X0 >= s.X1 {
continue
}
// This code mimics drawGlyphOver in $GOROOT/src/image/draw/draw.go.
ma := s.Alpha
const m = 1<<16 - 1
i0 := (s.Y-r.Image.Rect.Min.Y)*r.Image.Stride + (s.X0-r.Image.Rect.Min.X)*4
i1 := i0 + (s.X1-s.X0)*4
if r.Op == draw.Over {
for i := i0; i < i1; i += 4 {
dr := uint32(r.Image.Pix[i+0])
dg := uint32(r.Image.Pix[i+1])
db := uint32(r.Image.Pix[i+2])
da := uint32(r.Image.Pix[i+3])
a := (m - (r.ca * ma / m)) * 0x101
r.Image.Pix[i+0] = uint8((dr*a + r.cr*ma) / m >> 8)
r.Image.Pix[i+1] = uint8((dg*a + r.cg*ma) / m >> 8)
r.Image.Pix[i+2] = uint8((db*a + r.cb*ma) / m >> 8)
r.Image.Pix[i+3] = uint8((da*a + r.ca*ma) / m >> 8)
}
} else {
for i := i0; i < i1; i += 4 {
r.Image.Pix[i+0] = uint8(r.cr * ma / m >> 8)
r.Image.Pix[i+1] = uint8(r.cg * ma / m >> 8)
r.Image.Pix[i+2] = uint8(r.cb * ma / m >> 8)
r.Image.Pix[i+3] = uint8(r.ca * ma / m >> 8)
}
}
}
}
// SetColor sets the color to paint the spans.
func (r *RGBAPainter) SetColor(c color.Color) {
r.cr, r.cg, r.cb, r.ca = c.RGBA()
}
// NewRGBAPainter creates a new RGBAPainter for the given image.
func NewRGBAPainter(m *image.RGBA) *RGBAPainter {
return &RGBAPainter{Image: m}
}
// A MonochromePainter wraps another Painter, quantizing each Span's alpha to
// be either fully opaque or fully transparent.
type MonochromePainter struct {
Painter Painter
y, x0, x1 int
}
// Paint delegates to the wrapped Painter after quantizing each Span's alpha
// value and merging adjacent fully opaque Spans.
func (m *MonochromePainter) Paint(ss []Span, done bool) {
// We compact the ss slice, discarding any Spans whose alpha quantizes to zero.
j := 0
for _, s := range ss {
if s.Alpha >= 0x8000 {
if m.y == s.Y && m.x1 == s.X0 {
m.x1 = s.X1
} else {
ss[j] = Span{m.y, m.x0, m.x1, 1<<16 - 1}
j++
m.y, m.x0, m.x1 = s.Y, s.X0, s.X1
}
}
}
if done {
// Flush the accumulated Span.
finalSpan := Span{m.y, m.x0, m.x1, 1<<16 - 1}
if j < len(ss) {
ss[j] = finalSpan
j++
m.Painter.Paint(ss[:j], true)
} else if j == len(ss) {
m.Painter.Paint(ss, false)
if cap(ss) > 0 {
ss = ss[:1]
} else {
ss = make([]Span, 1)
}
ss[0] = finalSpan
m.Painter.Paint(ss, true)
} else {
panic("unreachable")
}
// Reset the accumulator, so that this Painter can be re-used.
m.y, m.x0, m.x1 = 0, 0, 0
} else {
m.Painter.Paint(ss[:j], false)
}
}
// NewMonochromePainter creates a new MonochromePainter that wraps the given
// Painter.
func NewMonochromePainter(p Painter) *MonochromePainter {
return &MonochromePainter{Painter: p}
}
// A GammaCorrectionPainter wraps another Painter, performing gamma-correction
// on each Span's alpha value.
type GammaCorrectionPainter struct {
// Painter is the wrapped Painter.
Painter Painter
// a is the precomputed alpha values for linear interpolation, with fully
// opaque == 0xffff.
a [256]uint16
// gammaIsOne is whether gamma correction is a no-op.
gammaIsOne bool
}
// Paint delegates to the wrapped Painter after performing gamma-correction on
// each Span.
func (g *GammaCorrectionPainter) Paint(ss []Span, done bool) {
if !g.gammaIsOne {
const n = 0x101
for i, s := range ss {
if s.Alpha == 0 || s.Alpha == 0xffff {
continue
}
p, q := s.Alpha/n, s.Alpha%n
// The resultant alpha is a linear interpolation of g.a[p] and g.a[p+1].
a := uint32(g.a[p])*(n-q) + uint32(g.a[p+1])*q
ss[i].Alpha = (a + n/2) / n
}
}
g.Painter.Paint(ss, done)
}
// SetGamma sets the gamma value.
func (g *GammaCorrectionPainter) SetGamma(gamma float64) {
g.gammaIsOne = gamma == 1
if g.gammaIsOne {
return
}
for i := 0; i < 256; i++ {
a := float64(i) / 0xff
a = math.Pow(a, gamma)
g.a[i] = uint16(0xffff * a)
}
}
// NewGammaCorrectionPainter creates a new GammaCorrectionPainter that wraps
// the given Painter.
func NewGammaCorrectionPainter(p Painter, gamma float64) *GammaCorrectionPainter {
g := &GammaCorrectionPainter{Painter: p}
g.SetGamma(gamma)
return g
}

601
vendor/github.com/golang/freetype/raster/raster.go generated vendored Normal file
View File

@ -0,0 +1,601 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// Package raster provides an anti-aliasing 2-D rasterizer.
//
// It is part of the larger Freetype suite of font-related packages, but the
// raster package is not specific to font rasterization, and can be used
// standalone without any other Freetype package.
//
// Rasterization is done by the same area/coverage accumulation algorithm as
// the Freetype "smooth" module, and the Anti-Grain Geometry library. A
// description of the area/coverage algorithm is at
// http://projects.tuxee.net/cl-vectors/section-the-cl-aa-algorithm
package raster // import "github.com/golang/freetype/raster"
import (
"strconv"
"golang.org/x/image/math/fixed"
)
// A cell is part of a linked list (for a given yi co-ordinate) of accumulated
// area/coverage for the pixel at (xi, yi).
type cell struct {
xi int
area, cover int
next int
}
type Rasterizer struct {
// If false, the default behavior is to use the even-odd winding fill
// rule during Rasterize.
UseNonZeroWinding bool
// An offset (in pixels) to the painted spans.
Dx, Dy int
// The width of the Rasterizer. The height is implicit in len(cellIndex).
width int
// splitScaleN is the scaling factor used to determine how many times
// to decompose a quadratic or cubic segment into a linear approximation.
splitScale2, splitScale3 int
// The current pen position.
a fixed.Point26_6
// The current cell and its area/coverage being accumulated.
xi, yi int
area, cover int
// Saved cells.
cell []cell
// Linked list of cells, one per row.
cellIndex []int
// Buffers.
cellBuf [256]cell
cellIndexBuf [64]int
spanBuf [64]Span
}
// findCell returns the index in r.cell for the cell corresponding to
// (r.xi, r.yi). The cell is created if necessary.
func (r *Rasterizer) findCell() int {
if r.yi < 0 || r.yi >= len(r.cellIndex) {
return -1
}
xi := r.xi
if xi < 0 {
xi = -1
} else if xi > r.width {
xi = r.width
}
i, prev := r.cellIndex[r.yi], -1
for i != -1 && r.cell[i].xi <= xi {
if r.cell[i].xi == xi {
return i
}
i, prev = r.cell[i].next, i
}
c := len(r.cell)
if c == cap(r.cell) {
buf := make([]cell, c, 4*c)
copy(buf, r.cell)
r.cell = buf[0 : c+1]
} else {
r.cell = r.cell[0 : c+1]
}
r.cell[c] = cell{xi, 0, 0, i}
if prev == -1 {
r.cellIndex[r.yi] = c
} else {
r.cell[prev].next = c
}
return c
}
// saveCell saves any accumulated r.area/r.cover for (r.xi, r.yi).
func (r *Rasterizer) saveCell() {
if r.area != 0 || r.cover != 0 {
i := r.findCell()
if i != -1 {
r.cell[i].area += r.area
r.cell[i].cover += r.cover
}
r.area = 0
r.cover = 0
}
}
// setCell sets the (xi, yi) cell that r is accumulating area/coverage for.
func (r *Rasterizer) setCell(xi, yi int) {
if r.xi != xi || r.yi != yi {
r.saveCell()
r.xi, r.yi = xi, yi
}
}
// scan accumulates area/coverage for the yi'th scanline, going from
// x0 to x1 in the horizontal direction (in 26.6 fixed point co-ordinates)
// and from y0f to y1f fractional vertical units within that scanline.
func (r *Rasterizer) scan(yi int, x0, y0f, x1, y1f fixed.Int26_6) {
// Break the 26.6 fixed point X co-ordinates into integral and fractional parts.
x0i := int(x0) / 64
x0f := x0 - fixed.Int26_6(64*x0i)
x1i := int(x1) / 64
x1f := x1 - fixed.Int26_6(64*x1i)
// A perfectly horizontal scan.
if y0f == y1f {
r.setCell(x1i, yi)
return
}
dx, dy := x1-x0, y1f-y0f
// A single cell scan.
if x0i == x1i {
r.area += int((x0f + x1f) * dy)
r.cover += int(dy)
return
}
// There are at least two cells. Apart from the first and last cells,
// all intermediate cells go through the full width of the cell,
// or 64 units in 26.6 fixed point format.
var (
p, q, edge0, edge1 fixed.Int26_6
xiDelta int
)
if dx > 0 {
p, q = (64-x0f)*dy, dx
edge0, edge1, xiDelta = 0, 64, 1
} else {
p, q = x0f*dy, -dx
edge0, edge1, xiDelta = 64, 0, -1
}
yDelta, yRem := p/q, p%q
if yRem < 0 {
yDelta -= 1
yRem += q
}
// Do the first cell.
xi, y := x0i, y0f
r.area += int((x0f + edge1) * yDelta)
r.cover += int(yDelta)
xi, y = xi+xiDelta, y+yDelta
r.setCell(xi, yi)
if xi != x1i {
// Do all the intermediate cells.
p = 64 * (y1f - y + yDelta)
fullDelta, fullRem := p/q, p%q
if fullRem < 0 {
fullDelta -= 1
fullRem += q
}
yRem -= q
for xi != x1i {
yDelta = fullDelta
yRem += fullRem
if yRem >= 0 {
yDelta += 1
yRem -= q
}
r.area += int(64 * yDelta)
r.cover += int(yDelta)
xi, y = xi+xiDelta, y+yDelta
r.setCell(xi, yi)
}
}
// Do the last cell.
yDelta = y1f - y
r.area += int((edge0 + x1f) * yDelta)
r.cover += int(yDelta)
}
// Start starts a new curve at the given point.
func (r *Rasterizer) Start(a fixed.Point26_6) {
r.setCell(int(a.X/64), int(a.Y/64))
r.a = a
}
// Add1 adds a linear segment to the current curve.
func (r *Rasterizer) Add1(b fixed.Point26_6) {
x0, y0 := r.a.X, r.a.Y
x1, y1 := b.X, b.Y
dx, dy := x1-x0, y1-y0
// Break the 26.6 fixed point Y co-ordinates into integral and fractional
// parts.
y0i := int(y0) / 64
y0f := y0 - fixed.Int26_6(64*y0i)
y1i := int(y1) / 64
y1f := y1 - fixed.Int26_6(64*y1i)
if y0i == y1i {
// There is only one scanline.
r.scan(y0i, x0, y0f, x1, y1f)
} else if dx == 0 {
// This is a vertical line segment. We avoid calling r.scan and instead
// manipulate r.area and r.cover directly.
var (
edge0, edge1 fixed.Int26_6
yiDelta int
)
if dy > 0 {
edge0, edge1, yiDelta = 0, 64, 1
} else {
edge0, edge1, yiDelta = 64, 0, -1
}
x0i, yi := int(x0)/64, y0i
x0fTimes2 := (int(x0) - (64 * x0i)) * 2
// Do the first pixel.
dcover := int(edge1 - y0f)
darea := int(x0fTimes2 * dcover)
r.area += darea
r.cover += dcover
yi += yiDelta
r.setCell(x0i, yi)
// Do all the intermediate pixels.
dcover = int(edge1 - edge0)
darea = int(x0fTimes2 * dcover)
for yi != y1i {
r.area += darea
r.cover += dcover
yi += yiDelta
r.setCell(x0i, yi)
}
// Do the last pixel.
dcover = int(y1f - edge0)
darea = int(x0fTimes2 * dcover)
r.area += darea
r.cover += dcover
} else {
// There are at least two scanlines. Apart from the first and last
// scanlines, all intermediate scanlines go through the full height of
// the row, or 64 units in 26.6 fixed point format.
var (
p, q, edge0, edge1 fixed.Int26_6
yiDelta int
)
if dy > 0 {
p, q = (64-y0f)*dx, dy
edge0, edge1, yiDelta = 0, 64, 1
} else {
p, q = y0f*dx, -dy
edge0, edge1, yiDelta = 64, 0, -1
}
xDelta, xRem := p/q, p%q
if xRem < 0 {
xDelta -= 1
xRem += q
}
// Do the first scanline.
x, yi := x0, y0i
r.scan(yi, x, y0f, x+xDelta, edge1)
x, yi = x+xDelta, yi+yiDelta
r.setCell(int(x)/64, yi)
if yi != y1i {
// Do all the intermediate scanlines.
p = 64 * dx
fullDelta, fullRem := p/q, p%q
if fullRem < 0 {
fullDelta -= 1
fullRem += q
}
xRem -= q
for yi != y1i {
xDelta = fullDelta
xRem += fullRem
if xRem >= 0 {
xDelta += 1
xRem -= q
}
r.scan(yi, x, edge0, x+xDelta, edge1)
x, yi = x+xDelta, yi+yiDelta
r.setCell(int(x)/64, yi)
}
}
// Do the last scanline.
r.scan(yi, x, edge0, x1, y1f)
}
// The next lineTo starts from b.
r.a = b
}
// Add2 adds a quadratic segment to the current curve.
func (r *Rasterizer) Add2(b, c fixed.Point26_6) {
// Calculate nSplit (the number of recursive decompositions) based on how
// 'curvy' it is. Specifically, how much the middle point b deviates from
// (a+c)/2.
dev := maxAbs(r.a.X-2*b.X+c.X, r.a.Y-2*b.Y+c.Y) / fixed.Int26_6(r.splitScale2)
nsplit := 0
for dev > 0 {
dev /= 4
nsplit++
}
// dev is 32-bit, and nsplit++ every time we shift off 2 bits, so maxNsplit
// is 16.
const maxNsplit = 16
if nsplit > maxNsplit {
panic("freetype/raster: Add2 nsplit too large: " + strconv.Itoa(nsplit))
}
// Recursively decompose the curve nSplit levels deep.
var (
pStack [2*maxNsplit + 3]fixed.Point26_6
sStack [maxNsplit + 1]int
i int
)
sStack[0] = nsplit
pStack[0] = c
pStack[1] = b
pStack[2] = r.a
for i >= 0 {
s := sStack[i]
p := pStack[2*i:]
if s > 0 {
// Split the quadratic curve p[:3] into an equivalent set of two
// shorter curves: p[:3] and p[2:5]. The new p[4] is the old p[2],
// and p[0] is unchanged.
mx := p[1].X
p[4].X = p[2].X
p[3].X = (p[4].X + mx) / 2
p[1].X = (p[0].X + mx) / 2
p[2].X = (p[1].X + p[3].X) / 2
my := p[1].Y
p[4].Y = p[2].Y
p[3].Y = (p[4].Y + my) / 2
p[1].Y = (p[0].Y + my) / 2
p[2].Y = (p[1].Y + p[3].Y) / 2
// The two shorter curves have one less split to do.
sStack[i] = s - 1
sStack[i+1] = s - 1
i++
} else {
// Replace the level-0 quadratic with a two-linear-piece
// approximation.
midx := (p[0].X + 2*p[1].X + p[2].X) / 4
midy := (p[0].Y + 2*p[1].Y + p[2].Y) / 4
r.Add1(fixed.Point26_6{midx, midy})
r.Add1(p[0])
i--
}
}
}
// Add3 adds a cubic segment to the current curve.
func (r *Rasterizer) Add3(b, c, d fixed.Point26_6) {
// Calculate nSplit (the number of recursive decompositions) based on how
// 'curvy' it is.
dev2 := maxAbs(r.a.X-3*(b.X+c.X)+d.X, r.a.Y-3*(b.Y+c.Y)+d.Y) / fixed.Int26_6(r.splitScale2)
dev3 := maxAbs(r.a.X-2*b.X+d.X, r.a.Y-2*b.Y+d.Y) / fixed.Int26_6(r.splitScale3)
nsplit := 0
for dev2 > 0 || dev3 > 0 {
dev2 /= 8
dev3 /= 4
nsplit++
}
// devN is 32-bit, and nsplit++ every time we shift off 2 bits, so
// maxNsplit is 16.
const maxNsplit = 16
if nsplit > maxNsplit {
panic("freetype/raster: Add3 nsplit too large: " + strconv.Itoa(nsplit))
}
// Recursively decompose the curve nSplit levels deep.
var (
pStack [3*maxNsplit + 4]fixed.Point26_6
sStack [maxNsplit + 1]int
i int
)
sStack[0] = nsplit
pStack[0] = d
pStack[1] = c
pStack[2] = b
pStack[3] = r.a
for i >= 0 {
s := sStack[i]
p := pStack[3*i:]
if s > 0 {
// Split the cubic curve p[:4] into an equivalent set of two
// shorter curves: p[:4] and p[3:7]. The new p[6] is the old p[3],
// and p[0] is unchanged.
m01x := (p[0].X + p[1].X) / 2
m12x := (p[1].X + p[2].X) / 2
m23x := (p[2].X + p[3].X) / 2
p[6].X = p[3].X
p[5].X = m23x
p[1].X = m01x
p[2].X = (m01x + m12x) / 2
p[4].X = (m12x + m23x) / 2
p[3].X = (p[2].X + p[4].X) / 2
m01y := (p[0].Y + p[1].Y) / 2
m12y := (p[1].Y + p[2].Y) / 2
m23y := (p[2].Y + p[3].Y) / 2
p[6].Y = p[3].Y
p[5].Y = m23y
p[1].Y = m01y
p[2].Y = (m01y + m12y) / 2
p[4].Y = (m12y + m23y) / 2
p[3].Y = (p[2].Y + p[4].Y) / 2
// The two shorter curves have one less split to do.
sStack[i] = s - 1
sStack[i+1] = s - 1
i++
} else {
// Replace the level-0 cubic with a two-linear-piece approximation.
midx := (p[0].X + 3*(p[1].X+p[2].X) + p[3].X) / 8
midy := (p[0].Y + 3*(p[1].Y+p[2].Y) + p[3].Y) / 8
r.Add1(fixed.Point26_6{midx, midy})
r.Add1(p[0])
i--
}
}
}
// AddPath adds the given Path.
func (r *Rasterizer) AddPath(p Path) {
for i := 0; i < len(p); {
switch p[i] {
case 0:
r.Start(
fixed.Point26_6{p[i+1], p[i+2]},
)
i += 4
case 1:
r.Add1(
fixed.Point26_6{p[i+1], p[i+2]},
)
i += 4
case 2:
r.Add2(
fixed.Point26_6{p[i+1], p[i+2]},
fixed.Point26_6{p[i+3], p[i+4]},
)
i += 6
case 3:
r.Add3(
fixed.Point26_6{p[i+1], p[i+2]},
fixed.Point26_6{p[i+3], p[i+4]},
fixed.Point26_6{p[i+5], p[i+6]},
)
i += 8
default:
panic("freetype/raster: bad path")
}
}
}
// AddStroke adds a stroked Path.
func (r *Rasterizer) AddStroke(q Path, width fixed.Int26_6, cr Capper, jr Joiner) {
Stroke(r, q, width, cr, jr)
}
// areaToAlpha converts an area value to a uint32 alpha value. A completely
// filled pixel corresponds to an area of 64*64*2, and an alpha of 0xffff. The
// conversion of area values greater than this depends on the winding rule:
// even-odd or non-zero.
func (r *Rasterizer) areaToAlpha(area int) uint32 {
// The C Freetype implementation (version 2.3.12) does "alpha := area>>1"
// without the +1. Round-to-nearest gives a more symmetric result than
// round-down. The C implementation also returns 8-bit alpha, not 16-bit
// alpha.
a := (area + 1) >> 1
if a < 0 {
a = -a
}
alpha := uint32(a)
if r.UseNonZeroWinding {
if alpha > 0x0fff {
alpha = 0x0fff
}
} else {
alpha &= 0x1fff
if alpha > 0x1000 {
alpha = 0x2000 - alpha
} else if alpha == 0x1000 {
alpha = 0x0fff
}
}
// alpha is now in the range [0x0000, 0x0fff]. Convert that 12-bit alpha to
// 16-bit alpha.
return alpha<<4 | alpha>>8
}
// Rasterize converts r's accumulated curves into Spans for p. The Spans passed
// to p are non-overlapping, and sorted by Y and then X. They all have non-zero
// width (and 0 <= X0 < X1 <= r.width) and non-zero A, except for the final
// Span, which has Y, X0, X1 and A all equal to zero.
func (r *Rasterizer) Rasterize(p Painter) {
r.saveCell()
s := 0
for yi := 0; yi < len(r.cellIndex); yi++ {
xi, cover := 0, 0
for c := r.cellIndex[yi]; c != -1; c = r.cell[c].next {
if cover != 0 && r.cell[c].xi > xi {
alpha := r.areaToAlpha(cover * 64 * 2)
if alpha != 0 {
xi0, xi1 := xi, r.cell[c].xi
if xi0 < 0 {
xi0 = 0
}
if xi1 >= r.width {
xi1 = r.width
}
if xi0 < xi1 {
r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha}
s++
}
}
}
cover += r.cell[c].cover
alpha := r.areaToAlpha(cover*64*2 - r.cell[c].area)
xi = r.cell[c].xi + 1
if alpha != 0 {
xi0, xi1 := r.cell[c].xi, xi
if xi0 < 0 {
xi0 = 0
}
if xi1 >= r.width {
xi1 = r.width
}
if xi0 < xi1 {
r.spanBuf[s] = Span{yi + r.Dy, xi0 + r.Dx, xi1 + r.Dx, alpha}
s++
}
}
if s > len(r.spanBuf)-2 {
p.Paint(r.spanBuf[:s], false)
s = 0
}
}
}
p.Paint(r.spanBuf[:s], true)
}
// Clear cancels any previous calls to r.Start or r.AddXxx.
func (r *Rasterizer) Clear() {
r.a = fixed.Point26_6{}
r.xi = 0
r.yi = 0
r.area = 0
r.cover = 0
r.cell = r.cell[:0]
for i := 0; i < len(r.cellIndex); i++ {
r.cellIndex[i] = -1
}
}
// SetBounds sets the maximum width and height of the rasterized image and
// calls Clear. The width and height are in pixels, not fixed.Int26_6 units.
func (r *Rasterizer) SetBounds(width, height int) {
if width < 0 {
width = 0
}
if height < 0 {
height = 0
}
// Use the same ssN heuristic as the C Freetype (version 2.4.0)
// implementation.
ss2, ss3 := 32, 16
if width > 24 || height > 24 {
ss2, ss3 = 2*ss2, 2*ss3
if width > 120 || height > 120 {
ss2, ss3 = 2*ss2, 2*ss3
}
}
r.width = width
r.splitScale2 = ss2
r.splitScale3 = ss3
r.cell = r.cellBuf[:0]
if height > len(r.cellIndexBuf) {
r.cellIndex = make([]int, height)
} else {
r.cellIndex = r.cellIndexBuf[:height]
}
r.Clear()
}
// NewRasterizer creates a new Rasterizer with the given bounds.
func NewRasterizer(width, height int) *Rasterizer {
r := new(Rasterizer)
r.SetBounds(width, height)
return r
}

483
vendor/github.com/golang/freetype/raster/stroke.go generated vendored Normal file
View File

@ -0,0 +1,483 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package raster
import (
"golang.org/x/image/math/fixed"
)
// Two points are considered practically equal if the square of the distance
// between them is less than one quarter (i.e. 1024 / 4096).
const epsilon = fixed.Int52_12(1024)
// A Capper signifies how to begin or end a stroked path.
type Capper interface {
// Cap adds a cap to p given a pivot point and the normal vector of a
// terminal segment. The normal's length is half of the stroke width.
Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6)
}
// The CapperFunc type adapts an ordinary function to be a Capper.
type CapperFunc func(Adder, fixed.Int26_6, fixed.Point26_6, fixed.Point26_6)
func (f CapperFunc) Cap(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) {
f(p, halfWidth, pivot, n1)
}
// A Joiner signifies how to join interior nodes of a stroked path.
type Joiner interface {
// Join adds a join to the two sides of a stroked path given a pivot
// point and the normal vectors of the trailing and leading segments.
// Both normals have length equal to half of the stroke width.
Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6)
}
// The JoinerFunc type adapts an ordinary function to be a Joiner.
type JoinerFunc func(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6)
func (f JoinerFunc) Join(lhs, rhs Adder, halfWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) {
f(lhs, rhs, halfWidth, pivot, n0, n1)
}
// RoundCapper adds round caps to a stroked path.
var RoundCapper Capper = CapperFunc(roundCapper)
func roundCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) {
// The cubic Bézier approximation to a circle involves the magic number
// (√2 - 1) * 4/3, which is approximately 35/64.
const k = 35
e := pRot90CCW(n1)
side := pivot.Add(e)
start, end := pivot.Sub(n1), pivot.Add(n1)
d, e := n1.Mul(k), e.Mul(k)
p.Add3(start.Add(e), side.Sub(d), side)
p.Add3(side.Add(d), end.Add(e), end)
}
// ButtCapper adds butt caps to a stroked path.
var ButtCapper Capper = CapperFunc(buttCapper)
func buttCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) {
p.Add1(pivot.Add(n1))
}
// SquareCapper adds square caps to a stroked path.
var SquareCapper Capper = CapperFunc(squareCapper)
func squareCapper(p Adder, halfWidth fixed.Int26_6, pivot, n1 fixed.Point26_6) {
e := pRot90CCW(n1)
side := pivot.Add(e)
p.Add1(side.Sub(n1))
p.Add1(side.Add(n1))
p.Add1(pivot.Add(n1))
}
// RoundJoiner adds round joins to a stroked path.
var RoundJoiner Joiner = JoinerFunc(roundJoiner)
func roundJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) {
dot := pDot(pRot90CW(n0), n1)
if dot >= 0 {
addArc(lhs, pivot, n0, n1)
rhs.Add1(pivot.Sub(n1))
} else {
lhs.Add1(pivot.Add(n1))
addArc(rhs, pivot, pNeg(n0), pNeg(n1))
}
}
// BevelJoiner adds bevel joins to a stroked path.
var BevelJoiner Joiner = JoinerFunc(bevelJoiner)
func bevelJoiner(lhs, rhs Adder, haflWidth fixed.Int26_6, pivot, n0, n1 fixed.Point26_6) {
lhs.Add1(pivot.Add(n1))
rhs.Add1(pivot.Sub(n1))
}
// addArc adds a circular arc from pivot+n0 to pivot+n1 to p. The shorter of
// the two possible arcs is taken, i.e. the one spanning <= 180 degrees. The
// two vectors n0 and n1 must be of equal length.
func addArc(p Adder, pivot, n0, n1 fixed.Point26_6) {
// r2 is the square of the length of n0.
r2 := pDot(n0, n0)
if r2 < epsilon {
// The arc radius is so small that we collapse to a straight line.
p.Add1(pivot.Add(n1))
return
}
// We approximate the arc by 0, 1, 2 or 3 45-degree quadratic segments plus
// a final quadratic segment from s to n1. Each 45-degree segment has
// control points {1, 0}, {1, tan(π/8)} and {1/√2, 1/√2} suitably scaled,
// rotated and translated. tan(π/8) is approximately 27/64.
const tpo8 = 27
var s fixed.Point26_6
// We determine which octant the angle between n0 and n1 is in via three
// dot products. m0, m1 and m2 are n0 rotated clockwise by 45, 90 and 135
// degrees.
m0 := pRot45CW(n0)
m1 := pRot90CW(n0)
m2 := pRot90CW(m0)
if pDot(m1, n1) >= 0 {
if pDot(n0, n1) >= 0 {
if pDot(m2, n1) <= 0 {
// n1 is between 0 and 45 degrees clockwise of n0.
s = n0
} else {
// n1 is between 45 and 90 degrees clockwise of n0.
p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0))
s = m0
}
} else {
pm1, n0t := pivot.Add(m1), n0.Mul(tpo8)
p.Add2(pivot.Add(n0).Add(m1.Mul(tpo8)), pivot.Add(m0))
p.Add2(pm1.Add(n0t), pm1)
if pDot(m0, n1) >= 0 {
// n1 is between 90 and 135 degrees clockwise of n0.
s = m1
} else {
// n1 is between 135 and 180 degrees clockwise of n0.
p.Add2(pm1.Sub(n0t), pivot.Add(m2))
s = m2
}
}
} else {
if pDot(n0, n1) >= 0 {
if pDot(m0, n1) >= 0 {
// n1 is between 0 and 45 degrees counter-clockwise of n0.
s = n0
} else {
// n1 is between 45 and 90 degrees counter-clockwise of n0.
p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2))
s = pNeg(m2)
}
} else {
pm1, n0t := pivot.Sub(m1), n0.Mul(tpo8)
p.Add2(pivot.Add(n0).Sub(m1.Mul(tpo8)), pivot.Sub(m2))
p.Add2(pm1.Add(n0t), pm1)
if pDot(m2, n1) <= 0 {
// n1 is between 90 and 135 degrees counter-clockwise of n0.
s = pNeg(m1)
} else {
// n1 is between 135 and 180 degrees counter-clockwise of n0.
p.Add2(pm1.Sub(n0t), pivot.Sub(m0))
s = pNeg(m0)
}
}
}
// The final quadratic segment has two endpoints s and n1 and the middle
// control point is a multiple of s.Add(n1), i.e. it is on the angle
// bisector of those two points. The multiple ranges between 128/256 and
// 150/256 as the angle between s and n1 ranges between 0 and 45 degrees.
//
// When the angle is 0 degrees (i.e. s and n1 are coincident) then
// s.Add(n1) is twice s and so the middle control point of the degenerate
// quadratic segment should be half s.Add(n1), and half = 128/256.
//
// When the angle is 45 degrees then 150/256 is the ratio of the lengths of
// the two vectors {1, tan(π/8)} and {1 + 1/√2, 1/√2}.
//
// d is the normalized dot product between s and n1. Since the angle ranges
// between 0 and 45 degrees then d ranges between 256/256 and 181/256.
d := 256 * pDot(s, n1) / r2
multiple := fixed.Int26_6(150-(150-128)*(d-181)/(256-181)) >> 2
p.Add2(pivot.Add(s.Add(n1).Mul(multiple)), pivot.Add(n1))
}
// midpoint returns the midpoint of two Points.
func midpoint(a, b fixed.Point26_6) fixed.Point26_6 {
return fixed.Point26_6{(a.X + b.X) / 2, (a.Y + b.Y) / 2}
}
// angleGreaterThan45 returns whether the angle between two vectors is more
// than 45 degrees.
func angleGreaterThan45(v0, v1 fixed.Point26_6) bool {
v := pRot45CCW(v0)
return pDot(v, v1) < 0 || pDot(pRot90CW(v), v1) < 0
}
// interpolate returns the point (1-t)*a + t*b.
func interpolate(a, b fixed.Point26_6, t fixed.Int52_12) fixed.Point26_6 {
s := 1<<12 - t
x := s*fixed.Int52_12(a.X) + t*fixed.Int52_12(b.X)
y := s*fixed.Int52_12(a.Y) + t*fixed.Int52_12(b.Y)
return fixed.Point26_6{fixed.Int26_6(x >> 12), fixed.Int26_6(y >> 12)}
}
// curviest2 returns the value of t for which the quadratic parametric curve
// (1-t)²*a + 2*t*(1-t).b + t²*c has maximum curvature.
//
// The curvature of the parametric curve f(t) = (x(t), y(t)) is
// |xy″-yx″| / (x²+y²)^(3/2).
//
// Let d = b-a and e = c-2*b+a, so that f(t) = 2*d+2*e*t and f″(t) = 2*e.
// The curvature's numerator is (2*dx+2*ex*t)*(2*ey)-(2*dy+2*ey*t)*(2*ex),
// which simplifies to 4*dx*ey-4*dy*ex, which is constant with respect to t.
//
// Thus, curvature is extreme where the denominator is extreme, i.e. where
// (x²+y²) is extreme. The first order condition is that
// 2*x*x″+2*y*y″ = 0, or (dx+ex*t)*ex + (dy+ey*t)*ey = 0.
// Solving for t gives t = -(dx*ex+dy*ey) / (ex*ex+ey*ey).
func curviest2(a, b, c fixed.Point26_6) fixed.Int52_12 {
dx := int64(b.X - a.X)
dy := int64(b.Y - a.Y)
ex := int64(c.X - 2*b.X + a.X)
ey := int64(c.Y - 2*b.Y + a.Y)
if ex == 0 && ey == 0 {
return 2048
}
return fixed.Int52_12(-4096 * (dx*ex + dy*ey) / (ex*ex + ey*ey))
}
// A stroker holds state for stroking a path.
type stroker struct {
// p is the destination that records the stroked path.
p Adder
// u is the half-width of the stroke.
u fixed.Int26_6
// cr and jr specify how to end and connect path segments.
cr Capper
jr Joiner
// r is the reverse path. Stroking a path involves constructing two
// parallel paths 2*u apart. The first path is added immediately to p,
// the second path is accumulated in r and eventually added in reverse.
r Path
// a is the most recent segment point. anorm is the segment normal of
// length u at that point.
a, anorm fixed.Point26_6
}
// addNonCurvy2 adds a quadratic segment to the stroker, where the segment
// defined by (k.a, b, c) achieves maximum curvature at either k.a or c.
func (k *stroker) addNonCurvy2(b, c fixed.Point26_6) {
// We repeatedly divide the segment at its middle until it is straight
// enough to approximate the stroke by just translating the control points.
// ds and ps are stacks of depths and points. t is the top of the stack.
const maxDepth = 5
var (
ds [maxDepth + 1]int
ps [2*maxDepth + 3]fixed.Point26_6
t int
)
// Initially the ps stack has one quadratic segment of depth zero.
ds[0] = 0
ps[2] = k.a
ps[1] = b
ps[0] = c
anorm := k.anorm
var cnorm fixed.Point26_6
for {
depth := ds[t]
a := ps[2*t+2]
b := ps[2*t+1]
c := ps[2*t+0]
ab := b.Sub(a)
bc := c.Sub(b)
abIsSmall := pDot(ab, ab) < fixed.Int52_12(1<<12)
bcIsSmall := pDot(bc, bc) < fixed.Int52_12(1<<12)
if abIsSmall && bcIsSmall {
// Approximate the segment by a circular arc.
cnorm = pRot90CCW(pNorm(bc, k.u))
mac := midpoint(a, c)
addArc(k.p, mac, anorm, cnorm)
addArc(&k.r, mac, pNeg(anorm), pNeg(cnorm))
} else if depth < maxDepth && angleGreaterThan45(ab, bc) {
// Divide the segment in two and push both halves on the stack.
mab := midpoint(a, b)
mbc := midpoint(b, c)
t++
ds[t+0] = depth + 1
ds[t-1] = depth + 1
ps[2*t+2] = a
ps[2*t+1] = mab
ps[2*t+0] = midpoint(mab, mbc)
ps[2*t-1] = mbc
continue
} else {
// Translate the control points.
bnorm := pRot90CCW(pNorm(c.Sub(a), k.u))
cnorm = pRot90CCW(pNorm(bc, k.u))
k.p.Add2(b.Add(bnorm), c.Add(cnorm))
k.r.Add2(b.Sub(bnorm), c.Sub(cnorm))
}
if t == 0 {
k.a, k.anorm = c, cnorm
return
}
t--
anorm = cnorm
}
panic("unreachable")
}
// Add1 adds a linear segment to the stroker.
func (k *stroker) Add1(b fixed.Point26_6) {
bnorm := pRot90CCW(pNorm(b.Sub(k.a), k.u))
if len(k.r) == 0 {
k.p.Start(k.a.Add(bnorm))
k.r.Start(k.a.Sub(bnorm))
} else {
k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, bnorm)
}
k.p.Add1(b.Add(bnorm))
k.r.Add1(b.Sub(bnorm))
k.a, k.anorm = b, bnorm
}
// Add2 adds a quadratic segment to the stroker.
func (k *stroker) Add2(b, c fixed.Point26_6) {
ab := b.Sub(k.a)
bc := c.Sub(b)
abnorm := pRot90CCW(pNorm(ab, k.u))
if len(k.r) == 0 {
k.p.Start(k.a.Add(abnorm))
k.r.Start(k.a.Sub(abnorm))
} else {
k.jr.Join(k.p, &k.r, k.u, k.a, k.anorm, abnorm)
}
// Approximate nearly-degenerate quadratics by linear segments.
abIsSmall := pDot(ab, ab) < epsilon
bcIsSmall := pDot(bc, bc) < epsilon
if abIsSmall || bcIsSmall {
acnorm := pRot90CCW(pNorm(c.Sub(k.a), k.u))
k.p.Add1(c.Add(acnorm))
k.r.Add1(c.Sub(acnorm))
k.a, k.anorm = c, acnorm
return
}
// The quadratic segment (k.a, b, c) has a point of maximum curvature.
// If this occurs at an end point, we process the segment as a whole.
t := curviest2(k.a, b, c)
if t <= 0 || 4096 <= t {
k.addNonCurvy2(b, c)
return
}
// Otherwise, we perform a de Casteljau decomposition at the point of
// maximum curvature and process the two straighter parts.
mab := interpolate(k.a, b, t)
mbc := interpolate(b, c, t)
mabc := interpolate(mab, mbc, t)
// If the vectors ab and bc are close to being in opposite directions,
// then the decomposition can become unstable, so we approximate the
// quadratic segment by two linear segments joined by an arc.
bcnorm := pRot90CCW(pNorm(bc, k.u))
if pDot(abnorm, bcnorm) < -fixed.Int52_12(k.u)*fixed.Int52_12(k.u)*2047/2048 {
pArc := pDot(abnorm, bc) < 0
k.p.Add1(mabc.Add(abnorm))
if pArc {
z := pRot90CW(abnorm)
addArc(k.p, mabc, abnorm, z)
addArc(k.p, mabc, z, bcnorm)
}
k.p.Add1(mabc.Add(bcnorm))
k.p.Add1(c.Add(bcnorm))
k.r.Add1(mabc.Sub(abnorm))
if !pArc {
z := pRot90CW(abnorm)
addArc(&k.r, mabc, pNeg(abnorm), z)
addArc(&k.r, mabc, z, pNeg(bcnorm))
}
k.r.Add1(mabc.Sub(bcnorm))
k.r.Add1(c.Sub(bcnorm))
k.a, k.anorm = c, bcnorm
return
}
// Process the decomposed parts.
k.addNonCurvy2(mab, mabc)
k.addNonCurvy2(mbc, c)
}
// Add3 adds a cubic segment to the stroker.
func (k *stroker) Add3(b, c, d fixed.Point26_6) {
panic("freetype/raster: stroke unimplemented for cubic segments")
}
// stroke adds the stroked Path q to p, where q consists of exactly one curve.
func (k *stroker) stroke(q Path) {
// Stroking is implemented by deriving two paths each k.u apart from q.
// The left-hand-side path is added immediately to k.p; the right-hand-side
// path is accumulated in k.r. Once we've finished adding the LHS to k.p,
// we add the RHS in reverse order.
k.r = make(Path, 0, len(q))
k.a = fixed.Point26_6{q[1], q[2]}
for i := 4; i < len(q); {
switch q[i] {
case 1:
k.Add1(
fixed.Point26_6{q[i+1], q[i+2]},
)
i += 4
case 2:
k.Add2(
fixed.Point26_6{q[i+1], q[i+2]},
fixed.Point26_6{q[i+3], q[i+4]},
)
i += 6
case 3:
k.Add3(
fixed.Point26_6{q[i+1], q[i+2]},
fixed.Point26_6{q[i+3], q[i+4]},
fixed.Point26_6{q[i+5], q[i+6]},
)
i += 8
default:
panic("freetype/raster: bad path")
}
}
if len(k.r) == 0 {
return
}
// TODO(nigeltao): if q is a closed curve then we should join the first and
// last segments instead of capping them.
k.cr.Cap(k.p, k.u, q.lastPoint(), pNeg(k.anorm))
addPathReversed(k.p, k.r)
pivot := q.firstPoint()
k.cr.Cap(k.p, k.u, pivot, pivot.Sub(fixed.Point26_6{k.r[1], k.r[2]}))
}
// Stroke adds q stroked with the given width to p. The result is typically
// self-intersecting and should be rasterized with UseNonZeroWinding.
// cr and jr may be nil, which defaults to a RoundCapper or RoundJoiner.
func Stroke(p Adder, q Path, width fixed.Int26_6, cr Capper, jr Joiner) {
if len(q) == 0 {
return
}
if cr == nil {
cr = RoundCapper
}
if jr == nil {
jr = RoundJoiner
}
if q[0] != 0 {
panic("freetype/raster: bad path")
}
s := stroker{p: p, u: width / 2, cr: cr, jr: jr}
i := 0
for j := 4; j < len(q); {
switch q[j] {
case 0:
s.stroke(q[i:j])
i, j = j, j+4
case 1:
j += 4
case 2:
j += 6
case 3:
j += 8
default:
panic("freetype/raster: bad path")
}
}
s.stroke(q[i:])
}

42
vendor/github.com/golang/freetype/testdata/COPYING generated vendored Normal file
View File

@ -0,0 +1,42 @@
Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font
instruction code copyright (c) 2001 by URW++ GmbH. All Rights
Reserved. Luxi is a registered trademark of Bigelow & Holmes Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of these Fonts and associated documentation files (the "Font
Software"), to deal in the Font Software, including without
limitation the rights to use, copy, merge, publish, distribute,
sublicense, and/or sell copies of the Font Software, and to permit
persons to whom the Font Software is furnished to do so, subject to
the following conditions:
The above copyright and trademark notices and this permission notice
shall be included in all copies of one or more of the Font Software.
The Font Software may not be modified, altered, or added to, and in
particular the designs of glyphs or characters in the Fonts may not
be modified nor may additional glyphs or characters be added to the
Fonts. This License becomes null and void when the Fonts or Font
Software have been modified.
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL
BIGELOW & HOLMES INC. OR URW++ GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES
OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT,
INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT
SOFTWARE.
Except as contained in this notice, the names of Bigelow & Holmes
Inc. and URW++ GmbH. shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Font Software without
prior written authorization from Bigelow & Holmes Inc. and URW++ GmbH.
For further information, contact:
info@urwpp.de
or
design@bigelowandholmes.com

13
vendor/github.com/golang/freetype/testdata/README generated vendored Normal file
View File

@ -0,0 +1,13 @@
The luxi*.ttf and COPYING files in this directory were copied from the X.org
project, specifically
http://xorg.freedesktop.org/releases/individual/font/font-bh-ttf-1.0.0.tar.bz2
There are three Luxi fonts: sans (s), serif (r) and monospaced (m). For example,
luxisr.ttf is Luxi Sans. The 'r' here means regular, as opposed to bold.
The *.ttx files in this directory were generated from the *.ttf files
by the ttx command-line tool.
http://www.letterror.com/code/ttx/index.html
The *-hinting.txt files in this directory were generated from the *.ttf files
by the ../cmd/print-glyph-points command-line tool.

BIN
vendor/github.com/golang/freetype/testdata/luximr.ttf generated vendored Normal file

Binary file not shown.

24616
vendor/github.com/golang/freetype/testdata/luximr.ttx generated vendored Normal file

File diff suppressed because it is too large Load Diff

BIN
vendor/github.com/golang/freetype/testdata/luxirr.ttf generated vendored Normal file

Binary file not shown.

30264
vendor/github.com/golang/freetype/testdata/luxirr.ttx generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,392 @@
freetype version 2.5.1
213 21 0 192 555;21 0 1, 21 555 1, 192 555 1, 192 0 1, 171 21 1, 171 534 1, 43 534 1, 43 21 1
0 0 0 0 0;
213 0 0 0 0;
213 0 0 0 0;
213 70 0 144 555;70 0 1, 70 74 1, 144 74 1, 144 0 1, 79 148 1, 70 444 1, 70 555 1, 144 555 1, 144 444 1, 135 148 1
273 35 407 238 592;44 407 1, 35 592 1, 108 592 1, 99 407 1, 173 407 1, 164 592 1, 238 592 1, 229 407 1
427 9 0 418 555;47 0 1, 89 167 1, 9 167 1, 18 213 1, 100 213 1, 133 342 1, 44 342 1, 54 389 1, 144 389 1, 186 555 1, 234 555 1, 192 389 1, 291 389 1, 332 555 1, 380 555 1, 339 389 1, 418 389 1, 409 342 1, 327 342 1, 294 213 1, 383 213 1, 374 167 1, 283 167 1, 242 0 1, 194 0 1, 235 167 1, 137 167 1, 95 0 1, 148 213 1, 247 213 1, 279 342 1, 180 342 1
427 39 -46 353 602;187 -46 1, 187 0 1, 121 0 0, 39 31 1, 39 95 1, 123 56 0, 187 56 1, 187 255 1, 117 298 0, 88 330 1, 55 368 0, 55 422 1, 55 486 0, 103 524 1, 135 550 0, 187 555 1, 187 602 1, 224 602 1, 224 555 1, 278 555 0, 344 530 1, 344 470 1, 273 501 0, 224 504 1, 224 307 1, 228 304 1, 238 298 0, 247 293 1, 251 290 1, 299 262 0, 322 237 1, 353 205 0, 353 155 1, 353 87 0, 308 42 1, 276 12 0, 224 0 1, 224 -46 1, 224 60 1, 288 85 0, 288 144 1, 288 175 0, 270 195 1, 257 210 0, 224 233 1, 187 331 1, 187 502 1, 120 479 0, 120 425 1, 120 376 0
683 42 -14 641 569;94 -14 1, 531 569 1, 589 569 1, 152 -14 1, 161 555 1, 216 555 0, 248 518 1, 280 480 0, 280 416 1, 280 352 0, 248 315 1, 216 278 0, 161 278 1, 106 278 0, 74 315 1, 42 353 0, 42 418 1, 42 475 0, 68 511 1, 101 555 0, 161 518 1, 134 518 0, 117 491 1, 100 462 0, 100 419 1, 100 375 0, 114 348 1, 131 315 0, 161 315 1, 189 315 0, 206 343 1, 222 371 0, 222 416 1, 222 462 0, 206 490 1, 188 518 0, 522 278 1, 577 278 0, 609 240 1, 641 203 0, 641 139 1, 641 75 0, 609 38 1, 577 0 0, 522 0 1, 467 0 0, 435 38 1, 403 75 0, 403 141 1, 403 198 0, 429 233 1, 462 278 0, 522 241 1, 494 241 0, 477 213 1, 461 185 0, 461 141 1, 461 98 0, 474 71 1, 491 37 0, 522 37 1, 549 37 0, 566 65 1, 583 93 0, 583 139 1, 583 185 0, 566 213 1, 549 241 0
512 21 -14 485 569;384 0 1, 357 33 1, 282 -14 0, 214 -14 1, 132 -14 0, 77 37 1, 21 88 0, 21 166 1, 21 243 0, 69 290 1, 98 318 0, 152 339 1, 119 400 0, 119 445 1, 119 501 0, 153 535 1, 188 569 0, 247 569 1, 303 569 0, 336 539 1, 368 508 0, 368 457 1, 368 401 0, 325 360 1, 298 335 0, 248 312 1, 311 198 0, 373 123 1, 410 171 0, 410 265 1, 410 295 1, 483 295 1, 483 165 0, 408 83 1, 441 41 0, 485 0 1, 325 76 1, 251 160 0, 178 296 1, 141 279 0, 123 257 1, 95 225 0, 95 179 1, 95 122 0, 134 82 1, 172 42 0, 226 42 1, 268 42 0, 220 359 1, 256 374 0, 273 392 1, 299 419 0, 299 456 1, 299 513 0, 246 513 1, 191 513 0, 191 453 1, 191 416 0, 217 365 1
147 27 389 120 592;45 389 1, 27 592 1, 120 592 1, 101 389 1
256 49 -111 225 592;225 -60 1, 225 -111 1, 150 -58 0, 107 21 1, 49 123 0, 49 241 1, 49 364 0, 111 470 1, 154 542 0, 225 592 1, 225 541 1, 174 485 0, 152 426 1, 123 353 0, 123 241 1, 123 124 0, 154 48 1, 177 -7 0
256 31 -111 207 592;31 541 1, 31 592 1, 106 539 0, 150 461 1, 207 359 0, 207 241 1, 207 117 0, 144 12 1, 102 -60 0, 31 -111 1, 31 -60 1, 81 -3 0, 104 56 1, 132 129 0, 132 241 1, 132 357 0, 101 433 1, 79 487 0
299 15 282 284 555;267 483 1, 284 431 1, 180 406 1, 180 407 1, 180 411 0, 180 411 1, 180 411 1, 180 427 0, 170 437 1, 255 314 1, 210 282 1, 152 382 1, 170 384 0, 178 401 1, 88 282 1, 43 314 1, 120 401 1, 128 384 0, 147 382 1, 15 431 1, 32 483 1, 129 437 1, 118 427 0, 118 411 1, 118 411 1, 118 411 0, 118 409 1, 119 408 1, 119 407 0, 119 406 1, 122 555 1, 177 555 1, 165 440 1, 157 444 0, 149 444 1, 141 444 0, 133 440 1
449 39 37 409 407;196 37 1, 196 194 1, 39 194 1, 39 250 1, 196 250 1, 196 407 1, 252 407 1, 252 250 1, 409 250 1, 409 194 1, 252 194 1, 252 37 1
213 60 -120 153 93;60 -120 1, 60 -93 1, 96 -83 0, 96 -8 1, 96 0 1, 60 0 1, 60 93 1, 153 93 1, 153 12 1, 153 -110 0
256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
213 60 0 153 93;60 0 1, 60 93 1, 153 93 1, 153 0 1
213 -22 -111 236 555;-22 -111 1, 178 555 1, 236 555 1, 36 -111 1
427 30 -14 397 569;213 569 1, 298 569 0, 347 491 1, 397 413 0, 397 279 1, 397 142 0, 347 64 1, 298 -14 0, 211 -14 1, 137 -14 0, 90 50 1, 30 130 0, 30 278 1, 30 413 0, 80 491 1, 129 569 0, 213 513 1, 163 513 0, 136 452 1, 109 390 0, 109 278 1, 109 167 0, 136 104 1, 163 42 0, 214 42 1, 260 42 0, 285 87 1, 318 148 0, 318 279 1, 318 392 0, 291 452 1, 263 513 0
427 86 0 383 569;86 0 1, 86 56 1, 197 56 1, 197 494 1, 86 466 1, 86 523 1, 272 569 1, 272 56 1, 383 56 1, 383 0 1
427 38 0 353 569;38 0 1, 38 65 1, 64 125 0, 125 188 1, 165 230 1, 202 267 1, 274 341 0, 274 415 1, 274 468 0, 246 493 1, 224 514 0, 184 514 1, 132 514 0, 52 469 1, 52 534 1, 128 569 0, 194 569 1, 267 569 0, 310 527 1, 353 485 0, 353 413 1, 353 364 0, 331 326 1, 308 287 0, 247 233 1, 221 209 1, 143 139 0, 128 65 1, 350 65 1, 350 0 1
427 57 -14 362 569;57 4 1, 57 73 1, 60 72 1, 70 68 0, 74 67 1, 115 52 0, 129 48 1, 154 42 0, 174 42 1, 230 42 0, 258 73 1, 283 100 0, 283 150 1, 283 208 0, 245 239 1, 208 270 0, 138 270 1, 109 270 1, 109 320 1, 134 320 1, 199 321 0, 234 350 1, 270 379 0, 270 430 1, 270 513 0, 180 513 1, 134 513 0, 65 482 1, 65 547 1, 133 569 0, 185 569 1, 275 569 0, 315 526 1, 344 494 0, 344 441 1, 344 381 0, 302 343 1, 277 320 0, 228 301 1, 271 290 0, 293 277 1, 362 237 0, 362 153 1, 362 77 0, 312 32 1, 263 -14 0, 181 -14 1, 137 -14 0
427 12 0 402 555;258 0 1, 258 157 1, 12 157 1, 12 213 1, 258 555 1, 327 555 1, 327 218 1, 402 218 1, 402 157 1, 327 157 1, 327 0 1, 84 218 1, 263 218 1, 263 464 1
427 61 -14 362 555;61 -2 1, 61 64 1, 118 42 0, 166 42 1, 221 42 0, 252 74 1, 284 107 0, 284 162 1, 284 288 0, 113 288 1, 92 288 0, 71 285 1, 71 555 1, 351 555 1, 351 491 1, 135 491 1, 135 344 1, 234 343 0, 291 304 1, 362 255 0, 362 159 1, 362 78 0, 308 32 1, 253 -14 0, 158 -14 1, 116 -14 0
427 32 -14 385 569;112 292 1, 164 356 0, 238 356 1, 306 356 0, 346 310 1, 385 264 0, 385 182 1, 385 92 0, 339 39 1, 292 -14 0, 214 -14 1, 129 -14 0, 80 59 1, 32 132 0, 32 260 1, 32 405 0, 90 487 1, 148 569 0, 251 569 1, 298 569 0, 355 548 1, 355 484 1, 287 514 0, 249 514 1, 166 514 0, 133 431 1, 120 398 0, 115 357 1, 113 335 0, 218 303 1, 172 303 0, 143 271 1, 114 239 0, 114 183 1, 114 122 0, 144 82 1, 174 42 0, 221 42 1, 312 42 0, 312 167 1, 312 303 0
427 51 0 407 555;83 0 1, 94 65 0, 114 112 1, 134 159 0, 185 242 1, 337 486 1, 51 486 1, 51 555 1, 407 555 1, 407 486 1, 194 171 0, 168 0 1
427 37 -14 408 569;147 302 1, 111 329 0, 92 353 1, 66 389 0, 66 429 1, 66 491 0, 112 530 1, 158 569 0, 233 569 1, 302 569 0, 344 536 1, 386 503 0, 386 449 1, 386 400 0, 349 357 1, 326 331 0, 283 302 1, 339 273 0, 368 243 1, 408 199 0, 408 143 1, 408 74 0, 356 30 1, 303 -14 0, 219 -14 1, 137 -14 0, 87 28 1, 37 69 0, 37 138 1, 37 198 0, 78 245 1, 102 274 0, 242 326 1, 319 379 0, 319 437 1, 319 472 0, 294 492 1, 268 513 0, 225 513 1, 183 513 0, 158 494 1, 133 474 0, 133 441 1, 133 402 0, 176 368 1, 197 351 0, 188 272 1, 146 240 0, 130 216 1, 111 189 0, 111 149 1, 111 101 0, 142 71 1, 173 42 0, 223 42 1, 271 42 0, 302 67 1, 332 92 0, 332 132 1, 332 168 0, 309 192 1, 289 212 0, 240 241 1
427 32 -14 385 569;305 263 1, 253 199 0, 179 199 1, 110 199 0, 71 245 1, 32 292 0, 32 373 1, 32 463 0, 78 516 1, 124 569 0, 202 569 1, 288 569 0, 336 496 1, 385 423 0, 385 296 1, 385 150 0, 327 68 1, 269 -14 0, 166 -14 1, 118 -14 0, 61 7 1, 61 71 1, 130 42 0, 168 42 1, 251 42 0, 284 125 1, 297 158 0, 302 198 1, 304 220 0, 196 513 1, 104 513 0, 104 389 1, 104 252 0, 198 252 1, 245 252 0, 273 284 1, 302 317 0, 302 372 1, 302 433 0, 273 473 1, 243 513 0
213 70 0 144 407;70 0 1, 70 74 1, 144 74 1, 144 0 1, 70 333 1, 70 407 1, 144 407 1, 144 333 1
213 70 -120 144 407;70 -120 1, 70 -93 1, 96 -79 0, 96 -9 1, 96 0 1, 70 0 1, 70 74 1, 144 74 1, 144 12 1, 143 -102 0, 70 333 1, 70 407 1, 144 407 1, 144 333 1
449 39 37 409 407;409 37 1, 39 222 1, 409 407 1, 409 345 1, 164 222 1, 164 222 1, 409 99 1
449 39 125 409 319;39 125 1, 39 180 1, 409 180 1, 409 125 1, 39 264 1, 39 319 1, 409 319 1, 409 264 1
449 39 37 409 407;39 407 1, 409 222 1, 39 37 1, 39 99 1, 284 222 1, 284 222 1, 39 345 1
427 52 0 380 569;141 0 1, 141 74 1, 215 74 1, 215 0 1, 141 148 1, 141 168 1, 141 260 0, 202 308 1, 236 334 1, 302 385 0, 302 440 1, 302 513 0, 199 513 1, 136 513 0, 52 486 1, 52 548 1, 135 569 0, 204 569 1, 281 569 0, 324 544 1, 380 512 0, 380 441 1, 380 371 0, 309 327 1, 278 308 1, 241 285 0, 228 260 1, 215 236 0, 215 189 1, 215 148 1
780 95 -14 692 569;470 17 1, 400 -14 0, 336 -14 1, 232 -14 0, 164 51 1, 95 116 0, 95 218 1, 95 356 0, 201 462 1, 306 569 0, 445 569 1, 551 569 0, 621 501 1, 692 434 0, 692 333 1, 692 241 0, 635 176 1, 578 111 0, 498 111 1, 435 111 0, 435 154 1, 435 169 0, 443 194 1, 458 241 1, 453 241 1, 422 182 0, 393 153 1, 352 111 0, 307 111 1, 236 111 0, 236 196 1, 236 290 0, 297 366 1, 357 442 0, 434 442 1, 443 442 0, 458 441 1, 462 441 0, 467 440 1, 482 440 0, 492 440 1, 543 440 1, 496 201 1, 494 190 0, 494 178 1, 494 153 0, 522 153 1, 572 153 0, 611 206 1, 650 260 0, 650 328 1, 650 414 0, 590 471 1, 531 528 0, 440 528 1, 321 528 0, 229 434 1, 137 341 0, 137 222 1, 137 135 0, 195 82 1, 252 28 0, 342 28 1, 400 28 0, 456 55 1, 462 312 1, 477 386 1, 442 398 0, 417 398 1, 364 398 0, 329 344 1, 294 291 0, 294 213 1, 294 157 0, 324 157 1, 374 157 0
512 7 0 503 555;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1
512 62 0 462 555;62 0 1, 62 555 1, 240 555 1, 349 555 0, 394 527 1, 440 498 0, 440 431 1, 440 369 0, 395 330 1, 368 307 0, 317 289 1, 382 270 0, 415 242 1, 462 202 0, 462 138 1, 462 80 0, 423 41 1, 396 13 0, 353 6 1, 318 0 0, 259 0 1, 141 59 1, 199 59 1, 309 59 0, 344 75 1, 378 92 0, 378 144 1, 378 201 0, 334 231 1, 289 261 0, 205 261 1, 141 261 1, 141 311 1, 208 311 1, 359 311 0, 359 417 1, 359 471 0, 315 485 1, 282 496 0, 213 496 1, 141 496 1
555 44 -14 507 569;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1
555 62 0 520 555;62 0 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1
512 72 0 491 555;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1
469 72 0 449 555;72 0 1, 72 555 1, 449 555 1, 449 496 1, 150 496 1, 150 310 1, 411 310 1, 411 252 1, 150 252 1, 150 0 1
597 35 -14 527 569;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1
555 62 0 492 555;62 0 1, 62 555 1, 141 555 1, 141 321 1, 414 321 1, 414 555 1, 492 555 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1
213 68 0 146 555;68 0 1, 68 555 1, 146 555 1, 146 0 1
384 18 -111 315 555;18 -87 1, 18 -19 1, 83 -48 0, 138 -48 1, 203 -48 0, 221 -18 1, 236 7 0, 236 68 1, 236 555 1, 315 555 1, 315 70 1, 315 -111 0, 135 -111 1, 74 -111 0
512 72 0 494 555;72 0 1, 72 555 1, 146 555 1, 146 282 1, 376 555 1, 455 555 1, 232 290 1, 494 0 1, 394 0 1, 146 281 1, 146 0 1
427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1
640 62 0 578 555;62 0 1, 62 555 1, 171 555 1, 324 126 1, 480 555 1, 578 555 1, 578 0 1, 504 0 1, 504 451 1, 353 37 1, 277 37 1, 130 453 1, 130 0 1
555 62 0 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1
597 35 -14 563 569;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0
512 63 0 494 555;63 0 1, 63 555 1, 280 555 1, 366 555 0, 403 545 1, 441 535 0, 465 507 1, 494 471 0, 494 408 1, 494 221 0, 257 221 1, 141 221 1, 141 0 1, 141 280 1, 254 280 1, 411 280 0, 411 404 1, 411 464 0, 370 481 1, 335 496 0, 255 496 1, 141 496 1
597 35 -111 615 569;615 -48 1, 565 -111 1, 434 -68 0, 346 -10 1, 307 -14 0, 287 -14 1, 177 -14 0, 106 68 1, 35 149 0, 35 278 1, 35 410 0, 107 489 1, 178 569 0, 298 569 1, 419 569 0, 491 489 1, 563 410 0, 563 277 1, 563 160 0, 509 87 1, 488 58 0, 460 38 1, 446 27 0, 418 11 1, 510 -30 0, 297 510 1, 214 510 0, 167 448 1, 119 387 0, 119 278 1, 119 169 0, 167 107 1, 214 45 0, 297 45 1, 382 45 0, 430 106 1, 479 167 0, 479 275 1, 479 376 0, 440 436 1, 392 510 0
555 62 0 538 555;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1
512 45 -14 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0
469 8 0 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1
555 62 -14 492 555;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1
512 14 0 508 555;228 0 1, 14 555 1, 95 555 1, 272 99 1, 441 555 1, 508 555 1, 302 0 1
725 9 0 716 555;152 0 1, 9 555 1, 85 555 1, 199 117 1, 329 555 1, 405 555 1, 530 121 1, 651 555 1, 716 555 1, 560 0 1, 482 0 1, 358 428 1, 230 0 1
512 11 0 502 555;11 0 1, 215 276 1, 20 555 1, 113 555 1, 263 339 1, 423 555 1, 498 555 1, 299 289 1, 502 0 1, 409 0 1, 251 224 1, 85 0 1
512 11 0 501 555;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1
469 38 0 431 555;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1
213 56 -111 204 592;56 -111 1, 56 592 1, 204 592 1, 204 537 1, 121 537 1, 121 -56 1, 204 -56 1, 204 -111 1
213 -22 -111 236 555;236 -111 1, 178 -111 1, -22 555 1, 36 555 1
213 10 -111 158 592;158 592 1, 158 -111 1, 10 -111 1, 10 -56 1, 93 -56 1, 93 537 1, 10 537 1, 10 592 1
360 14 222 347 555;180 431 1, 75 222 1, 14 222 1, 180 555 1, 347 222 1, 284 222 1
427 0 -56 427 0;0 -56 1, 0 0 1, 427 0 1, 427 -56 1
256 40 481 216 602;216 481 1, 160 481 1, 40 602 1, 125 602 1
427 36 -9 412 416;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0
427 58 -9 395 592;132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 58 -5 1, 58 592 1, 132 592 1
384 32 -9 347 416;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1
427 32 -9 369 592;295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 592 1, 369 592 1, 369 0 1, 295 0 1
427 32 -9 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0
213 12 0 236 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 213 407 1, 213 352 1, 140 352 1, 140 0 1
427 35 -158 372 416;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1
427 58 0 374 592;58 0 1, 58 592 1, 132 592 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
171 48 0 122 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1
171 -58 -157 124 555;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0, 50 481 1, 50 555 1, 124 555 1, 124 481 1
384 58 0 377 592;58 0 1, 58 592 1, 132 592 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1
171 48 0 122 592;48 0 1, 48 592 1, 122 592 1, 122 0 1
640 58 0 587 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 164 380 0, 185 397 1, 210 416 0, 249 416 1, 298 416 0, 329 385 1, 346 366 0, 359 331 1, 392 380 0, 413 397 1, 437 416 0, 477 416 1, 587 416 0, 587 296 1, 587 0 1, 513 0 1, 512 285 1, 512 355 0, 458 355 1, 410 355 0, 359 273 1, 359 0 1, 285 0 1, 285 285 1, 285 355 0, 231 355 1, 183 355 0, 132 273 1, 132 0 1
427 58 0 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
427 32 -9 395 416;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0
427 58 -148 395 416;132 -148 1, 58 -148 1, 58 407 1, 132 407 1, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0
427 32 -148 369 416;295 407 1, 369 407 1, 369 -148 1, 295 -148 1, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0
256 58 0 251 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1
384 44 -9 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0
213 11 -9 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1
427 53 -9 369 407;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1
384 7 0 380 407;152 0 1, 7 407 1, 82 407 1, 195 90 1, 314 407 1, 380 407 1, 225 0 1
555 4 0 549 407;102 0 1, 4 407 1, 77 407 1, 150 101 1, 244 407 1, 318 407 1, 400 99 1, 486 407 1, 549 407 1, 435 0 1, 361 0 1, 275 315 1, 177 0 1
384 11 0 372 407;11 0 1, 143 215 1, 15 407 1, 101 407 1, 203 255 1, 294 407 1, 362 407 1, 238 202 1, 372 0 1, 287 0 1, 177 164 1, 79 0 1
384 7 -148 380 407;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1
384 28 0 356 407;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1
257 9 -111 213 592;9 269 1, 32 269 1, 90 269 0, 90 330 1, 90 354 0, 84 381 1, 77 414 1, 69 447 0, 69 476 1, 69 537 0, 120 569 1, 156 591 0, 213 592 1, 213 537 1, 193 537 1, 167 537 0, 151 524 1, 134 510 0, 134 490 1, 134 482 0, 139 455 1, 145 416 1, 149 391 0, 149 361 1, 149 290 0, 94 241 1, 149 192 0, 149 120 1, 149 90 0, 145 65 1, 139 27 1, 134 -1 0, 134 -9 1, 134 -29 0, 151 -42 1, 168 -56 0, 193 -56 1, 213 -56 1, 213 -111 1, 153 -110 0, 117 -85 1, 69 -53 0, 69 6 1, 69 35 0, 77 67 1, 84 100 1, 90 127 0, 90 152 1, 90 213 0, 32 213 1, 9 213 1
200 72 -111 128 592;72 -111 1, 72 592 1, 128 592 1, 128 -111 1
257 44 -111 247 592;247 213 1, 224 213 1, 167 213 0, 167 152 1, 167 124 0, 173 100 1, 180 67 1, 187 36 0, 187 6 1, 187 -56 0, 135 -88 1, 100 -110 0, 44 -111 1, 44 -56 1, 63 -56 1, 89 -56 0, 105 -42 1, 122 -29 0, 122 -9 1, 122 1 0, 118 27 1, 111 65 1, 107 88 0, 107 120 1, 107 192 0, 162 241 1, 137 263 0, 125 285 1, 107 318 0, 107 361 1, 107 393 0, 111 416 1, 118 455 1, 122 480 0, 122 491 1, 122 510 0, 105 524 1, 88 537 0, 63 537 1, 44 537 1, 44 592 1, 104 591 0, 140 566 1, 187 534 0, 187 475 1, 187 445 0, 180 414 1, 173 381 1, 167 357 0, 167 329 1, 167 269 0, 224 269 1, 247 269 1
449 39 155 409 290;95 167 1, 39 167 1, 40 206 0, 47 227 1, 69 290 0, 139 290 1, 176 290 0, 213 264 1, 255 235 1, 280 218 1, 291 210 0, 309 210 1, 352 210 0, 354 278 1, 409 278 1, 408 238 0, 401 217 1, 379 155 0, 310 155 1, 273 155 0, 235 180 1, 193 209 1, 168 227 1, 157 234 0, 140 234 1, 96 234 0
512 7 0 503 666;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 150 602 1, 150 666 1, 215 666 1, 215 602 1, 299 602 1, 299 666 1, 363 666 1, 363 602 1
512 7 0 503 726;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 257 726 1, 292 726 0, 317 701 1, 342 676 0, 342 641 1, 342 605 0, 317 580 1, 292 555 0, 256 555 1, 225 555 0, 202 576 1, 172 602 0, 172 641 1, 172 676 0, 197 701 1, 222 726 0, 257 693 1, 235 693 0, 219 678 1, 204 663 0, 204 641 1, 204 619 0, 219 603 1, 235 588 0, 256 588 1, 276 588 0, 291 600 1, 310 616 0, 310 641 1, 310 663 0, 294 678 1, 279 693 0
555 44 -162 507 569;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 288 0 1, 324 0 1, 302 -41 1, 329 -42 0, 348 -56 1, 374 -74 0, 374 -101 1, 374 -126 0, 352 -144 1, 330 -162 0, 298 -162 1, 273 -162 0, 244 -154 1, 244 -124 1, 263 -129 0, 283 -129 1, 322 -129 0, 322 -102 1, 322 -67 0, 252 -66 1
512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 224 602 1, 315 722 1, 400 722 1, 280 602 1
555 62 0 492 689;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 162 602 1, 165 637 0, 174 656 1, 191 689 0, 232 689 1, 259 689 0, 282 675 1, 305 661 1, 326 648 0, 337 648 1, 362 648 0, 366 689 1, 412 689 1, 409 654 0, 400 635 1, 383 602 0, 342 602 1, 315 602 0, 292 616 1, 269 630 1, 249 643 0, 237 643 1, 212 643 0, 208 602 1
597 35 -14 563 666;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 192 602 1, 192 666 1, 257 666 1, 257 602 1, 340 602 1, 340 666 1, 405 666 1, 405 602 1
555 62 -14 492 666;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 176 602 1, 176 666 1, 240 666 1, 240 602 1, 324 602 1, 324 666 1, 389 666 1, 389 602 1
427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
427 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
427 36 -9 412 546;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
427 36 -9 412 569;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
427 36 -9 412 651;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 192 651 1, 227 651 0, 252 627 1, 277 602 0, 277 567 1, 277 531 0, 252 506 1, 227 481 0, 191 481 1, 160 481 0, 137 501 1, 107 527 0, 107 566 1, 107 602 0, 132 626 1, 156 651 0, 192 619 1, 170 619 0, 154 603 1, 139 588 0, 139 566 1, 139 545 0, 154 529 1, 170 513 0, 191 513 1, 211 513 0, 226 526 1, 245 542 0, 245 567 1, 245 588 0, 229 603 1, 214 619 0
384 32 -162 347 416;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 235 0 1, 271 0 1, 248 -41 1, 275 -42 0, 295 -56 1, 321 -74 0, 321 -101 1, 321 -126 0, 299 -144 1, 277 -162 0, 245 -162 1, 220 -162 0, 191 -154 1, 191 -124 1, 210 -129 0, 230 -129 1, 269 -129 0, 269 -102 1, 269 -67 0, 199 -66 1
427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
427 32 -9 383 546;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
171 40 0 216 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, 40 481 1, 131 602 1, 216 602 1, 96 481 1
171 -24 0 152 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, 152 481 1, 96 481 1, -24 602 1, 61 602 1
171 -67 0 195 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, -67 481 1, 23 602 1, 105 602 1, 195 481 1, 140 481 1, 64 557 1, 64 557 1, -12 481 1
171 -21 0 192 546;48 0 1, 48 407 1, 122 407 1, 122 0 1, -21 481 1, -21 546 1, 44 546 1, 44 481 1, 127 481 1, 127 546 1, 192 546 1, 192 481 1
427 58 0 374 569;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 280 481 1, 224 481 1, 104 602 1, 189 602 1
427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
427 32 -9 395 546;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
427 32 -9 395 569;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 67 481 1, 70 516 0, 79 535 1, 96 569 0, 137 569 1, 164 569 0, 187 555 1, 210 541 1, 231 528 0, 242 528 1, 267 528 0, 271 569 1, 317 569 1, 314 534 0, 305 515 1, 288 481 0, 247 481 1, 220 481 0, 197 496 1, 174 510 1, 154 522 0, 142 522 1, 117 522 0, 113 481 1
427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 280 481 1, 224 481 1, 104 602 1, 189 602 1
427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 61 481 1, 151 602 1, 233 602 1, 323 481 1, 268 481 1, 192 557 1, 192 557 1, 116 481 1
427 53 -9 369 546;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
427 56 -111 371 555;177 -111 1, 186 315 1, 56 305 1, 56 361 1, 186 352 1, 177 555 1, 251 555 1, 241 352 1, 371 361 1, 371 305 1, 241 315 1, 251 -111 1
307 43 347 265 569;154 569 1, 199 569 0, 232 536 1, 265 504 0, 265 458 1, 265 412 0, 232 380 1, 199 347 0, 152 347 1, 113 347 0, 82 373 1, 43 408 0, 43 458 1, 43 504 0, 75 536 1, 108 569 0, 154 523 1, 127 523 0, 108 504 1, 89 485 0, 89 458 1, 89 432 0, 108 413 1, 127 393 0, 153 393 1, 177 393 0, 195 409 1, 219 428 0, 219 458 1, 219 485 0, 200 504 1, 180 523 0
427 65 0 380 555;237 0 1, 237 65 1, 166 74 0, 123 120 1, 65 181 0, 65 278 1, 65 379 0, 124 435 1, 165 475 0, 237 486 1, 237 555 1, 274 555 1, 274 486 1, 324 483 0, 380 468 1, 380 406 1, 314 429 0, 274 432 1, 274 117 1, 325 117 0, 380 143 1, 380 87 1, 324 65 0, 274 65 1, 274 0 1, 237 429 1, 215 426 0, 203 420 1, 146 390 0, 146 277 1, 146 199 0, 180 158 1, 200 135 0, 237 122 1
427 45 0 362 569;45 0 1, 45 65 1, 124 90 0, 124 183 1, 124 269 1, 57 269 1, 57 324 1, 124 324 1, 124 405 1, 124 485 0, 162 527 1, 200 569 0, 272 569 1, 310 569 0, 357 558 1, 357 495 1, 308 513 0, 269 513 1, 198 513 0, 198 427 1, 198 324 1, 279 324 1, 279 269 1, 198 269 1, 198 221 1, 198 153 0, 180 120 1, 166 92 0, 133 65 1, 362 65 1, 362 0 1
427 48 -125 379 569;48 -98 1, 48 -30 1, 142 -69 0, 203 -69 1, 250 -69 0, 281 -51 1, 311 -32 0, 311 -1 1, 311 27 0, 288 43 1, 270 56 0, 225 75 1, 159 104 1, 50 150 0, 50 230 1, 50 284 0, 105 342 1, 52 379 0, 52 434 1, 52 494 0, 101 531 1, 149 569 0, 229 569 1, 284 569 0, 358 551 1, 358 491 1, 280 513 0, 228 513 1, 179 513 0, 149 494 1, 119 475 0, 119 445 1, 119 404 0, 185 377 1, 236 357 1, 314 325 0, 343 296 1, 373 266 0, 373 221 1, 373 168 0, 317 104 1, 379 66 0, 379 3 1, 379 -56 0, 329 -90 1, 279 -125 0, 196 -125 1, 138 -125 0, 281 128 1, 308 166 0, 308 200 1, 308 228 0, 290 245 1, 272 263 0, 226 282 1, 143 317 1, 115 282 0, 115 249 1, 115 198 0, 201 162 1
269 30 208 239 416;135 416 1, 178 416 0, 208 386 1, 239 355 0, 239 312 1, 239 269 0, 208 239 1, 177 208 0, 133 208 1, 96 208 0, 67 233 1, 30 265 0, 30 312 1, 30 356 0, 61 386 1, 92 416 0
413 33 -111 338 555;190 -111 1, 190 278 1, 122 284 0, 83 316 1, 33 358 0, 33 433 1, 33 499 0, 69 527 1, 105 555 0, 190 555 1, 338 555 1, 338 -111 1, 292 -111 1, 292 509 1, 237 509 1, 237 -111 1
469 48 -9 437 602;48 0 1, 48 432 1, 48 527 0, 83 564 1, 117 602 0, 206 602 1, 349 602 0, 349 500 1, 349 451 0, 300 399 1, 261 357 0, 261 337 1, 261 312 0, 303 281 1, 372 230 1, 437 182 0, 437 111 1, 437 -9 0, 296 -9 1, 234 -9 0, 183 11 1, 183 76 1, 253 46 0, 296 46 1, 368 46 0, 368 104 1, 368 141 0, 324 174 1, 244 236 1, 195 273 0, 195 315 1, 195 351 0, 238 407 1, 275 455 0, 275 487 1, 275 546 0, 201 546 1, 157 546 0, 140 528 1, 122 509 0, 122 463 1, 122 0 1
566 6 0 561 555;283 555 1, 398 555 0, 479 474 1, 561 393 0, 561 278 1, 561 162 0, 479 81 1, 398 0 0, 280 0 1, 179 0 0, 104 66 1, 6 152 0, 6 278 1, 6 393 0, 87 474 1, 169 555 0, 283 516 1, 185 516 0, 115 446 1, 45 376 0, 45 278 1, 45 181 0, 115 110 1, 184 40 0, 281 40 1, 370 40 0, 437 96 1, 521 168 0, 521 278 1, 521 376 0, 451 446 1, 381 516 0, 192 126 1, 192 426 1, 286 426 1, 377 426 0, 377 353 1, 377 301 0, 324 266 1, 415 126 1, 359 126 1, 278 252 1, 240 252 1, 240 126 1, 237 289 1, 251 289 1, 330 289 0, 330 347 1, 330 396 0, 264 396 1, 237 396 1
566 6 0 561 555;283 555 1, 398 555 0, 479 474 1, 561 393 0, 561 278 1, 561 162 0, 479 81 1, 398 0 0, 280 0 1, 179 0 0, 104 66 1, 6 152 0, 6 278 1, 6 393 0, 87 474 1, 169 555 0, 283 516 1, 185 516 0, 115 446 1, 45 376 0, 45 278 1, 45 181 0, 115 110 1, 184 40 0, 281 40 1, 370 40 0, 437 96 1, 521 168 0, 521 278 1, 521 376 0, 451 446 1, 381 516 0, 384 137 1, 333 119 0, 293 119 1, 226 119 0, 183 163 1, 140 207 0, 140 276 1, 140 348 0, 182 391 1, 224 434 0, 295 434 1, 332 434 0, 375 425 1, 384 423 1, 384 379 1, 336 399 0, 298 399 1, 251 399 0, 222 365 1, 193 332 0, 193 277 1, 193 222 0, 223 191 1, 253 159 0, 303 159 1, 343 159 0, 384 181 1
768 83 278 662 555;176 278 1, 176 509 1, 83 509 1, 83 555 1, 333 555 1, 333 509 1, 240 509 1, 240 278 1, 380 278 1, 380 555 1, 467 555 1, 525 395 1, 582 555 1, 662 555 1, 662 278 1, 597 278 1, 597 479 1, 536 301 1, 491 301 1, 430 463 1, 430 278 1
256 40 481 216 602;40 481 1, 131 602 1, 216 602 1, 96 481 1
256 21 481 234 546;21 481 1, 21 546 1, 86 546 1, 86 481 1, 170 481 1, 170 546 1, 234 546 1, 234 481 1
213 0 0 0 0;
768 7 0 746 555;224 213 1, 381 213 1, 381 460 1, 7 0 1, 360 555 1, 730 555 1, 730 496 1, 459 496 1, 459 318 1, 693 318 1, 693 260 1, 459 260 1, 459 59 1, 746 59 1, 746 0 1, 381 0 1, 381 155 1, 187 155 1, 89 0 1
597 35 -14 563 569;39 -14 1, 104 69 1, 74 107 0, 58 146 1, 35 204 0, 35 278 1, 35 410 0, 107 490 1, 179 569 0, 298 569 1, 389 569 0, 459 519 1, 498 569 1, 563 569 1, 496 484 1, 525 446 0, 541 407 1, 563 350 0, 563 277 1, 563 144 0, 491 65 1, 419 -14 0, 299 -14 1, 211 -14 0, 142 34 1, 104 -14 1, 184 88 1, 233 45 0, 299 45 1, 384 45 0, 431 106 1, 479 167 0, 479 276 1, 479 363 0, 448 423 1, 416 465 1, 366 510 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 279 1, 119 190 0, 152 129 1
213 0 0 0 0;
449 39 0 409 444;196 111 1, 196 250 1, 39 250 1, 39 305 1, 196 305 1, 196 444 1, 252 444 1, 252 305 1, 409 305 1, 409 250 1, 252 250 1, 252 111 1, 39 0 1, 39 56 1, 409 56 1, 409 0 1
213 0 0 0 0;
213 0 0 0 0;
427 9 0 404 555;170 0 1, 170 129 1, 59 129 1, 59 176 1, 170 176 1, 170 231 1, 59 231 1, 59 278 1, 170 278 1, 9 555 1, 95 555 1, 216 346 1, 216 346 1, 338 555 1, 404 555 1, 244 278 1, 355 278 1, 355 231 1, 244 231 1, 244 176 1, 355 176 1, 355 129 1, 244 129 1, 244 0 1
427 53 -148 369 407;53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 295 0 1, 295 76 1, 236 -7 0, 176 -7 1, 152 -7 0, 127 9 1, 127 -148 1, 53 -148 1
213 0 0 0 0;
213 0 0 0 0;
213 0 0 0 0;
213 0 0 0 0;
213 0 0 0 0;
284 32 308 267 569;182 343 1, 144 308 0, 105 308 1, 74 308 0, 53 328 1, 32 348 0, 32 378 1, 32 464 0, 161 464 1, 179 464 1, 179 490 1, 179 531 0, 133 531 1, 97 531 0, 54 509 1, 54 551 1, 102 569 0, 144 569 1, 234 569 0, 234 492 1, 234 380 1, 234 345 0, 255 346 1, 257 346 1, 258 346 0, 261 346 1, 263 346 0, 265 347 1, 267 315 1, 248 308 0, 231 308 1, 194 308 0, 184 343 1, 179 374 1, 179 431 1, 164 431 1, 88 431 0, 88 385 1, 88 350 0, 124 350 1, 150 350 0
281 28 308 252 569;140 569 1, 192 569 0, 222 534 1, 252 499 0, 252 439 1, 252 378 0, 222 343 1, 192 308 0, 139 308 1, 93 308 0, 64 337 1, 28 373 0, 28 439 1, 28 499 0, 58 534 1, 89 569 0, 140 531 1, 87 531 0, 87 439 1, 87 347 0, 140 347 1, 194 347 0, 194 440 1, 194 531 0
213 0 0 0 0;
683 36 -9 638 416;288 92 1, 288 197 1, 260 198 1, 235 199 0, 207 195 1, 110 181 0, 110 114 1, 110 51 0, 184 51 1, 236 51 0, 344 369 1, 400 416 0, 472 416 1, 638 416 0, 638 215 1, 638 192 1, 360 192 1, 365 148 0, 375 125 1, 408 47 0, 512 47 1, 568 47 0, 636 72 1, 636 13 1, 559 -9 0, 494 -9 1, 423 -9 0, 374 23 1, 347 41 0, 322 77 1, 279 31 0, 248 12 1, 211 -9 0, 160 -9 1, 104 -9 0, 70 21 1, 36 53 0, 36 102 1, 36 241 0, 270 241 1, 288 241 1, 288 290 1, 288 329 0, 269 345 1, 251 361 0, 205 361 1, 141 361 0, 71 325 1, 71 386 1, 148 416 0, 218 416 1, 303 416 0, 364 248 1, 564 248 1, 563 284 0, 556 302 1, 536 361 0, 469 361 1, 422 361 0, 396 333 1, 371 308 0
469 54 -9 416 416;131 22 1, 108 -9 1, 54 -9 1, 99 53 1, 54 116 0, 54 204 1, 54 303 0, 102 360 1, 151 416 0, 236 416 1, 296 416 0, 339 385 1, 362 416 1, 416 416 1, 371 354 1, 416 291 0, 416 203 1, 416 105 0, 367 48 1, 319 -9 0, 234 -9 1, 174 -9 0, 169 75 1, 170 75 1, 185 59 0, 198 53 1, 215 46 0, 234 46 1, 336 46 0, 336 204 1, 336 251 0, 325 291 1, 301 332 1, 300 333 1, 272 361 0, 235 361 1, 134 361 0, 134 205 1, 134 152 0, 145 116 1
469 69 -162 398 407;309 407 1, 309 333 1, 235 333 1, 235 407 1, 309 259 1, 309 239 1, 309 147 0, 248 99 1, 214 73 1, 148 22 0, 148 -33 1, 148 -107 0, 251 -107 1, 314 -107 0, 398 -78 1, 398 -141 1, 316 -162 0, 246 -162 1, 169 -162 0, 125 -137 1, 69 -105 0, 69 -34 1, 69 36 0, 141 81 1, 171 99 1, 209 122 0, 222 147 1, 235 171 0, 235 218 1, 235 259 1
256 91 -148 165 407;165 407 1, 165 333 1, 91 333 1, 91 407 1, 156 259 1, 165 -37 1, 165 -148 1, 91 -148 1, 91 -37 1, 100 259 1
449 32 111 402 333;32 278 1, 32 333 1, 402 333 1, 402 111 1, 347 111 1, 347 278 1
213 0 0 0 0;
427 18 -111 384 569;18 -111 1, 94 269 1, 32 269 1, 32 324 1, 105 324 1, 113 363 1, 154 569 0, 300 569 1, 339 569 0, 384 558 1, 373 500 1, 332 514 0, 299 514 1, 218 514 0, 195 398 1, 180 324 1, 251 324 1, 251 269 1, 169 269 1, 94 -111 1
213 0 0 0 0;
213 0 0 0 0;
427 43 37 376 370;376 342 1, 265 204 1, 376 65 1, 339 37 1, 191 204 1, 339 370 1, 228 342 1, 117 204 1, 228 65 1, 191 37 1, 43 204 1, 191 370 1
427 51 37 384 370;51 65 1, 162 204 1, 51 342 1, 88 370 1, 236 204 1, 88 37 1, 199 65 1, 310 204 1, 199 342 1, 236 370 1, 384 204 1, 236 37 1
768 93 0 676 74;93 0 1, 93 74 1, 167 74 1, 167 0 1, 347 0 1, 347 74 1, 421 74 1, 421 0 1, 602 0 1, 602 74 1, 676 74 1, 676 0 1
427 0 0 0 0;
512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 312 602 1, 257 602 1, 137 722 1, 222 722 1
512 7 0 503 689;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 132 602 1, 135 636 0, 144 656 1, 161 689 0, 202 689 1, 229 689 0, 252 675 1, 275 661 1, 296 648 0, 307 648 1, 332 648 0, 336 689 1, 382 689 1, 379 654 0, 370 635 1, 353 602 0, 312 602 1, 285 602 0, 262 616 1, 239 630 1, 219 643 0, 207 643 1, 182 643 0, 178 602 1
597 35 -14 563 689;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 174 602 1, 176 636 0, 186 656 1, 203 689 0, 244 689 1, 271 689 0, 294 675 1, 316 661 1, 338 648 0, 349 648 1, 373 648 0, 377 689 1, 423 689 1, 421 654 0, 411 635 1, 395 602 0, 354 602 1, 327 602 0, 303 616 1, 281 630 1, 260 643 0, 248 643 1, 224 643 0, 220 602 1
768 35 -14 747 569;423 0 1, 423 22 1, 362 -14 0, 291 -14 1, 176 -14 0, 105 66 1, 35 147 0, 35 278 1, 35 411 0, 106 490 1, 177 569 0, 294 569 1, 363 569 0, 423 534 1, 423 555 1, 730 555 1, 730 496 1, 502 496 1, 502 318 1, 693 318 1, 693 260 1, 502 260 1, 502 59 1, 747 59 1, 747 0 1, 423 213 1, 423 342 1, 423 430 0, 393 470 1, 363 510 0, 296 510 1, 212 510 0, 165 449 1, 119 388 0, 119 278 1, 119 167 0, 165 106 1, 213 45 0, 296 45 1, 423 45 0
725 32 -9 680 416;371 341 1, 395 375 0, 422 392 1, 461 416 0, 516 416 1, 612 416 0, 650 348 1, 678 297 0, 680 192 1, 412 192 1, 419 120 0, 447 87 1, 481 46 0, 560 46 1, 618 46 0, 680 73 1, 680 14 1, 608 -9 0, 542 -9 1, 474 -9 0, 434 12 1, 404 29 0, 373 65 1, 350 32 0, 323 15 1, 283 -9 0, 227 -9 1, 138 -9 0, 85 48 1, 32 106 0, 32 204 1, 32 302 0, 86 359 1, 138 416 0, 228 416 1, 287 416 0, 327 388 1, 350 372 0, 228 361 1, 111 361 0, 111 205 1, 111 137 0, 134 98 1, 163 46 0, 229 46 1, 337 46 0, 337 204 1, 337 276 0, 314 315 1, 288 361 0, 414 243 1, 601 243 1, 600 291 0, 588 317 1, 567 361 0, 514 361 1, 462 361 0, 437 321 1, 420 295 0
427 38 204 390 250;38 204 1, 38 250 1, 390 250 1, 390 204 1
768 37 204 731 241;37 204 1, 37 241 1, 731 241 1, 731 204 1
256 21 398 225 592;225 592 1, 225 564 1, 198 551 0, 198 480 1, 198 472 1, 225 472 1, 225 398 1, 151 398 1, 151 460 1, 151 573 0, 95 592 1, 95 564 1, 69 551 0, 69 480 1, 69 472 1, 95 472 1, 95 398 1, 21 398 1, 21 460 1, 22 573 0
256 31 398 234 592;31 398 1, 31 426 1, 57 440 0, 57 510 1, 57 518 1, 31 518 1, 31 592 1, 105 592 1, 105 530 1, 104 417 0, 160 398 1, 160 426 1, 187 440 0, 187 510 1, 187 518 1, 160 518 1, 160 592 1, 234 592 1, 234 530 1, 234 417 0
171 35 380 127 592;127 592 1, 127 564 1, 91 554 0, 91 480 1, 91 472 1, 127 472 1, 127 380 1, 35 380 1, 35 460 1, 35 582 0
171 44 380 136 592;44 380 1, 44 407 1, 80 417 0, 80 492 1, 80 500 1, 44 500 1, 44 592 1, 136 592 1, 136 512 1, 136 389 0
449 39 0 409 444;39 194 1, 39 250 1, 409 250 1, 409 194 1, 178 352 1, 178 444 1, 270 444 1, 270 352 1, 178 0 1, 178 93 1, 270 93 1, 270 0 1
213 0 0 0 0;
384 7 -148 380 546;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 85 481 1, 85 546 1, 150 546 1, 150 481 1, 234 481 1, 234 546 1, 298 546 1, 298 481 1
512 11 0 501 666;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 158 602 1, 158 666 1, 223 666 1, 223 602 1, 306 602 1, 306 666 1, 371 666 1, 371 602 1
128 -165 -14 293 569;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
427 46 110 381 446;137 168 1, 78 110 1, 46 143 1, 104 201 1, 80 240 0, 80 278 1, 80 315 0, 104 354 1, 46 413 1, 78 446 1, 137 387 1, 174 411 0, 213 411 1, 253 411 0, 290 387 1, 348 446 1, 381 413 1, 323 354 1, 347 315 0, 347 278 1, 347 240 0, 323 201 1, 381 143 1, 348 110 1, 290 168 1, 253 144 0, 213 144 1, 174 144 0, 213 365 1, 177 365 0, 152 339 1, 126 314 0, 126 277 1, 126 241 0, 152 216 1, 176 191 0, 212 191 1, 246 191 0, 270 211 1, 300 237 0, 300 278 1, 300 314 0, 275 339 1, 250 365 0
256 28 37 213 370;213 342 1, 102 204 1, 213 65 1, 176 37 1, 28 204 1, 176 370 1
256 43 37 228 370;43 65 1, 154 204 1, 43 342 1, 80 370 1, 228 204 1, 80 37 1
384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 336 407 1, 336 0 1, 262 0 1, 262 352 1, 140 352 1, 140 0 1, 262 481 1, 262 555 1, 336 555 1, 336 481 1
384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 179 602 1, 262 592 1, 336 592 1, 336 0 1, 262 0 1, 262 537 1, 246 540 1, 214 546 0, 192 546 1, 159 546 0, 148 524 1, 140 505 0, 140 464 1, 140 407 1, 206 407 1, 206 352 1, 140 352 1, 140 0 1
427 56 -111 371 555;177 -111 1, 186 93 1, 56 83 1, 56 139 1, 186 129 1, 186 315 1, 56 305 1, 56 361 1, 186 352 1, 177 555 1, 251 555 1, 241 352 1, 371 361 1, 371 305 1, 241 315 1, 241 129 1, 371 139 1, 371 83 1, 241 93 1, 251 -111 1
213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
171 39 -111 132 93;39 -111 1, 39 -83 1, 75 -73 0, 75 -8 1, 75 0 1, 39 0 1, 39 93 1, 132 93 1, 132 12 1, 131 -101 0
256 26 -120 230 74;26 -120 1, 26 -93 1, 53 -79 0, 53 -9 1, 53 0 1, 26 0 1, 26 74 1, 100 74 1, 100 12 1, 100 -102 0, 156 -120 1, 156 -93 1, 182 -78 0, 182 -9 1, 182 0 1, 156 0 1, 156 74 1, 230 74 1, 230 12 1, 230 -102 0
768 9 -14 759 569;128 555 1, 181 555 0, 213 518 1, 245 480 0, 245 417 1, 245 352 0, 213 315 1, 182 278 0, 126 278 1, 78 278 0, 48 308 1, 9 347 0, 9 416 1, 9 480 0, 41 518 1, 74 555 0, 127 518 1, 65 518 0, 65 417 1, 65 315 0, 128 315 1, 190 315 0, 190 416 1, 190 463 0, 173 491 1, 156 518 0, 377 278 1, 431 278 0, 463 240 1, 495 203 0, 495 139 1, 495 74 0, 463 37 1, 431 0 0, 376 0 1, 328 0 0, 297 30 1, 259 69 0, 259 139 1, 259 203 0, 291 240 1, 323 278 0, 377 241 1, 315 241 0, 315 139 1, 315 37 0, 377 37 1, 440 37 0, 440 138 1, 440 186 0, 423 213 1, 405 241 0, 641 278 1, 695 278 0, 727 240 1, 759 203 0, 759 140 1, 759 74 0, 727 37 1, 695 0 0, 640 0 1, 592 0 0, 561 31 1, 523 69 0, 523 139 1, 523 203 0, 555 240 1, 587 278 0, 640 241 1, 578 241 0, 578 139 1, 578 37 0, 641 37 1, 704 37 0, 704 139 1, 704 186 0, 686 213 1, 669 241 0, 23 -14 1, 431 569 1, 482 569 1, 74 -14 1
512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 126 602 1, 216 722 1, 298 722 1, 388 602 1, 333 602 1, 257 677 1, 257 677 1, 181 602 1
512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 150 602 1, 240 722 1, 322 722 1, 412 602 1, 357 602 1, 281 677 1, 281 677 1, 205 602 1
512 7 0 503 722;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 201 602 1, 292 722 1, 377 722 1, 257 602 1
512 72 0 491 666;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 169 602 1, 169 666 1, 234 666 1, 234 602 1, 317 602 1, 317 666 1, 382 666 1, 382 602 1
512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 335 602 1, 280 602 1, 159 722 1, 245 722 1
213 51 0 227 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, 51 602 1, 142 722 1, 227 722 1, 107 602 1
213 -24 0 238 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, -24 602 1, 66 722 1, 148 722 1, 238 602 1, 183 602 1, 107 677 1, 107 677 1, 31 602 1
213 0 0 213 666;68 0 1, 68 555 1, 146 555 1, 146 0 1, 0 602 1, 0 666 1, 65 666 1, 65 602 1, 149 602 1, 149 666 1, 213 666 1, 213 602 1
213 -14 0 162 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, 162 602 1, 107 602 1, -14 722 1, 72 722 1
597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 243 602 1, 333 722 1, 419 722 1, 299 602 1
597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 167 602 1, 258 722 1, 339 722 1, 430 602 1, 374 602 1, 299 677 1, 298 677 1, 223 602 1
427 0 -14 405 568;141 201 1, 156 141 0, 178 108 1, 218 48 0, 290 48 1, 337 48 0, 405 75 1, 405 10 1, 332 -14 0, 281 -14 1, 194 -14 0, 140 38 1, 101 74 0, 82 134 1, 75 156 0, 66 201 1, 0 201 1, 19 248 1, 61 248 1, 60 276 1, 60 277 0, 60 284 1, 61 300 0, 62 321 1, 0 321 1, 19 368 1, 69 368 1, 84 430 0, 102 462 1, 161 568 0, 293 568 1, 341 568 0, 405 552 1, 405 483 1, 342 510 0, 294 510 1, 228 510 0, 188 462 1, 166 434 0, 154 400 1, 149 386 0, 144 368 1, 356 368 1, 337 321 1, 136 321 1, 134 294 0, 134 276 1, 135 248 1, 307 248 1, 288 201 1
597 35 -14 563 722;299 569 1, 418 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 418 -14 0, 295 -14 1, 189 -14 0, 120 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 213 510 0, 166 449 1, 119 388 0, 119 278 1, 119 169 0, 166 107 1, 213 45 0, 297 45 1, 374 45 0, 420 95 1, 478 156 0, 478 278 1, 478 388 0, 431 449 1, 383 510 0, 354 602 1, 299 602 1, 178 722 1, 264 722 1
555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 227 602 1, 317 722 1, 402 722 1, 282 602 1
555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 151 602 1, 241 722 1, 323 722 1, 413 602 1, 358 602 1, 282 677 1, 282 677 1, 206 602 1
555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 338 602 1, 282 602 1, 162 722 1, 247 722 1
171 48 0 122 407;48 0 1, 48 407 1, 122 407 1, 122 0 1
256 -3 481 259 602;-3 481 1, 87 602 1, 169 602 1, 259 481 1, 204 481 1, 128 557 1, 128 557 1, 52 481 1
256 3 481 253 569;3 481 1, 6 516 0, 15 535 1, 32 569 0, 73 569 1, 100 569 0, 123 555 1, 146 541 1, 167 528 0, 178 528 1, 203 528 0, 207 569 1, 253 569 1, 250 534 0, 241 515 1, 224 481 0, 183 481 1, 156 481 0, 133 496 1, 110 510 1, 90 522 0, 78 522 1, 53 522 0, 49 481 1
256 8 481 248 537;8 481 1, 8 537 1, 248 537 1, 248 481 1
256 3 481 253 602;3 602 1, 49 602 1, 57 566 0, 77 551 1, 97 537 0, 128 537 1, 163 537 0, 183 555 1, 200 570 0, 207 602 1, 253 602 1, 247 551 0, 219 521 1, 184 481 0, 128 481 1, 69 481 0, 33 524 1, 9 554 0
256 91 481 165 555;91 481 1, 91 555 1, 165 555 1, 165 481 1
256 43 481 213 651;128 651 1, 163 651 0, 188 627 1, 213 602 0, 213 567 1, 213 531 0, 188 506 1, 163 481 0, 127 481 1, 96 481 0, 73 501 1, 43 527 0, 43 566 1, 43 602 0, 68 626 1, 92 651 0, 128 619 1, 106 619 0, 90 603 1, 75 588 0, 75 566 1, 75 545 0, 90 529 1, 106 513 0, 127 513 1, 147 513 0, 162 526 1, 181 542 0, 181 567 1, 181 588 0, 165 603 1, 150 619 0
256 63 -162 193 0;107 0 1, 143 0 1, 120 -41 1, 147 -42 0, 167 -56 1, 193 -74 0, 193 -101 1, 193 -126 0, 171 -144 1, 149 -162 0, 117 -162 1, 92 -162 0, 63 -154 1, 63 -124 1, 82 -129 0, 102 -129 1, 141 -129 0, 141 -102 1, 141 -67 0, 71 -66 1
256 -19 481 275 602;-19 481 1, 71 602 1, 143 602 1, 23 481 1, 113 481 1, 203 602 1, 275 602 1, 155 481 1
256 64 -139 192 0;123 0 1, 163 0 1, 115 -30 0, 115 -67 1, 115 -103 0, 158 -103 1, 178 -103 0, 192 -98 1, 192 -128 1, 169 -139 0, 140 -139 1, 64 -139 0, 64 -80 1, 64 -34 0
256 -3 481 259 602;259 602 1, 169 481 1, 87 481 1, -3 602 1, 52 602 1, 128 526 1, 128 526 1, 204 602 1
427 0 -14 405 568;141 201 1, 156 141 0, 178 108 1, 218 48 0, 290 48 1, 337 48 0, 405 75 1, 405 10 1, 332 -14 0, 281 -14 1, 194 -14 0, 140 38 1, 101 74 0, 82 134 1, 75 156 0, 66 201 1, 0 201 1, 19 248 1, 61 248 1, 60 276 1, 60 277 0, 60 284 1, 61 300 0, 62 321 1, 0 321 1, 19 368 1, 69 368 1, 84 430 0, 102 462 1, 161 568 0, 293 568 1, 341 568 0, 405 552 1, 405 483 1, 342 510 0, 294 510 1, 228 510 0, 188 462 1, 166 434 0, 154 400 1, 149 386 0, 144 368 1, 356 368 1, 337 321 1, 136 321 1, 134 294 0, 134 276 1, 135 248 1, 307 248 1, 288 201 1
213 0 0 0 0;
200 72 -111 128 592;72 -111 1, 72 167 1, 128 167 1, 128 -111 1, 72 315 1, 72 592 1, 128 592 1, 128 315 1
256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
427 37 546 390 602;37 546 1, 37 602 1, 390 602 1, 390 546 1
256 28 222 240 564;28 222 1, 28 268 1, 53 312 0, 96 350 1, 122 373 1, 181 425 0, 181 471 1, 181 525 0, 120 525 1, 85 525 0, 36 500 1, 36 543 1, 85 564 0, 130 564 1, 179 564 0, 210 538 1, 240 513 0, 240 473 1, 240 420 0, 171 363 1, 151 346 1, 101 305 0, 92 268 1, 238 268 1, 238 222 1
256 28 214 234 564;32 507 1, 32 549 1, 75 564 0, 117 564 1, 223 564 0, 223 486 1, 223 450 0, 197 426 1, 182 413 0, 151 402 1, 199 389 0, 218 364 1, 234 343 0, 234 312 1, 234 267 0, 201 240 1, 169 214 0, 112 214 1, 74 214 0, 28 225 1, 28 270 1, 78 251 0, 108 251 1, 175 251 0, 175 312 1, 175 381 0, 78 381 1, 59 381 1, 59 416 1, 75 416 1, 167 416 0, 167 478 1, 167 526 0, 108 526 1, 74 526 0
213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
256 46 222 176 564;120 222 1, 120 507 1, 46 488 1, 46 531 1, 176 564 1, 176 222 1
641 44 -14 594 569;117 222 1, 117 507 1, 44 488 1, 44 531 1, 173 564 1, 173 222 1, 497 0 1, 497 91 1, 344 91 1, 344 133 1, 495 333 1, 548 333 1, 548 135 1, 594 135 1, 594 91 1, 548 91 1, 548 0 1, 393 135 1, 497 135 1, 497 271 1, 72 -14 1, 480 569 1, 530 569 1, 122 -14 1
641 44 -14 594 569;382 0 1, 382 46 1, 406 88 0, 450 128 1, 477 151 1, 535 203 0, 535 249 1, 535 303 0, 475 303 1, 440 303 0, 390 278 1, 390 321 1, 440 341 0, 485 341 1, 534 341 0, 564 316 1, 594 291 0, 594 250 1, 594 196 0, 525 140 1, 505 124 1, 455 83 0, 447 46 1, 593 46 1, 593 0 1, 53 -14 1, 461 569 1, 512 569 1, 104 -14 1, 117 222 1, 117 507 1, 44 488 1, 44 531 1, 173 564 1, 173 222 1
641 42 -14 599 569;46 507 1, 46 549 1, 89 564 0, 131 564 1, 237 564 0, 237 486 1, 237 450 0, 211 426 1, 195 413 0, 165 402 1, 213 389 0, 232 364 1, 248 343 0, 248 312 1, 248 267 0, 215 240 1, 183 214 0, 126 214 1, 87 214 0, 42 225 1, 42 270 1, 92 251 0, 122 251 1, 189 251 0, 189 312 1, 189 381 0, 92 381 1, 72 381 1, 72 416 1, 89 416 1, 180 416 0, 180 478 1, 180 526 0, 122 526 1, 88 526 0, 502 0 1, 502 91 1, 349 91 1, 349 133 1, 500 333 1, 552 333 1, 552 135 1, 599 135 1, 599 91 1, 552 91 1, 552 0 1, 398 135 1, 502 135 1, 502 271 1, 107 -14 1, 515 569 1, 565 569 1, 157 -14 1
555 2 0 520 555;62 0 1, 62 255 1, 2 255 1, 2 314 1, 62 314 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 141 314 1, 266 314 1, 266 255 1, 141 255 1
449 44 42 404 402;44 81 1, 185 222 1, 44 363 1, 84 402 1, 224 261 1, 365 402 1, 404 363 1, 264 222 1, 404 81 1, 365 42 1, 224 183 1, 84 42 1
512 11 0 501 722;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 204 602 1, 294 722 1, 380 722 1, 259 602 1
512 63 0 494 555;63 0 1, 63 555 1, 141 555 1, 141 450 1, 280 450 1, 366 450 0, 403 440 1, 441 431 0, 465 402 1, 494 366 0, 494 304 1, 494 116 0, 257 116 1, 141 116 1, 141 0 1, 141 175 1, 254 175 1, 411 175 0, 411 299 1, 411 359 0, 370 376 1, 335 391 0, 255 391 1, 141 391 1
427 32 -9 395 629;47 538 1, 47 594 1, 122 594 0, 183 565 1, 241 629 1, 270 596 1, 222 542 1, 269 506 0, 294 478 1, 395 366 0, 395 206 1, 395 105 0, 347 48 1, 299 -9 0, 216 -9 1, 132 -9 0, 82 48 1, 32 105 0, 32 201 1, 32 297 0, 81 352 1, 129 407 0, 214 407 1, 234 407 0, 259 402 1, 230 456 0, 177 494 1, 122 432 1, 92 465 1, 140 518 1, 102 538 0, 212 352 1, 165 352 0, 138 312 1, 111 272 0, 111 199 1, 111 46 0, 214 46 1, 316 46 0, 316 199 1, 316 352 0
384 7 -148 380 602;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
427 58 -148 395 592;132 -148 1, 58 -148 1, 58 592 1, 132 592 1, 132 331 1, 153 369 0, 176 389 1, 209 416 0, 254 416 1, 317 416 0, 356 361 1, 395 306 0, 395 215 1, 395 108 0, 344 49 1, 294 -9 0, 203 -9 1, 168 -9 0, 132 0 1, 132 264 1, 132 56 1, 183 46 0, 209 46 1, 315 46 0, 315 207 1, 315 275 0, 294 313 1, 273 352 0, 238 352 1, 191 352 0
514 8 0 504 657;8 0 1, 219 555 1, 297 555 1, 504 0 1, 419 0 1, 362 154 1, 139 154 1, 81 0 1, 161 212 1, 340 212 1, 251 450 1, 137 602 1, 137 657 1, 378 657 1, 378 602 1
432 36 -9 412 537;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
514 8 0 504 722;8 0 1, 219 555 1, 297 555 1, 504 0 1, 419 0 1, 362 154 1, 139 154 1, 81 0 1, 161 212 1, 340 212 1, 251 450 1, 133 722 1, 179 722 1, 187 687 0, 207 672 1, 227 657 0, 258 657 1, 293 657 0, 313 675 1, 329 690 0, 336 722 1, 383 722 1, 377 672 0, 349 641 1, 314 602 0, 258 602 1, 199 602 0, 163 645 1, 139 674 0
432 36 -9 412 602;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 67 602 1, 113 602 1, 121 566 0, 141 551 1, 161 537 0, 192 537 1, 227 537 0, 247 555 1, 264 570 0, 271 602 1, 317 602 1, 311 551 0, 283 521 1, 248 481 0, 192 481 1, 133 481 0, 97 524 1, 73 554 0
512 7 -139 503 555;7 0 1, 218 555 1, 296 555 1, 503 0 1, 419 0 1, 361 154 1, 138 154 1, 80 0 1, 161 212 1, 339 212 1, 250 450 1, 419 0 1, 459 0 1, 411 -30 0, 411 -67 1, 411 -103 0, 454 -103 1, 474 -103 0, 488 -98 1, 488 -128 1, 464 -139 0, 435 -139 1, 359 -139 0, 359 -80 1, 359 -34 0
427 36 -139 412 416;290 52 1, 221 -9 0, 155 -9 1, 102 -9 0, 69 22 1, 36 53 0, 36 102 1, 36 241 0, 262 241 1, 279 241 1, 279 290 1, 279 361 0, 201 361 1, 140 361 0, 71 325 1, 71 386 1, 148 416 0, 215 416 1, 287 416 0, 320 386 1, 353 356 0, 353 290 1, 353 105 1, 353 42 0, 392 42 1, 398 42 0, 407 44 1, 412 3 1, 384 -9 0, 357 -9 1, 332 -9 0, 315 5 1, 299 19 0, 279 92 1, 279 197 1, 255 198 1, 233 199 0, 205 195 1, 112 182 0, 112 114 1, 112 51 0, 180 51 1, 227 51 0, 315 0 1, 355 0 1, 307 -30 0, 307 -67 1, 307 -103 0, 350 -103 1, 370 -103 0, 384 -98 1, 384 -128 1, 361 -139 0, 332 -139 1, 256 -139 0, 256 -80 1, 256 -34 0
555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 264 602 1, 355 722 1, 440 722 1, 320 602 1
384 32 -9 347 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 189 602 1, 279 722 1, 361 722 1, 451 602 1, 396 602 1, 320 677 1, 320 677 1, 244 602 1
384 32 -9 359 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 96 481 1, 187 602 1, 269 602 1, 359 481 1, 303 481 1, 228 557 1, 227 557 1, 152 481 1
555 44 -14 507 675;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 283 602 1, 283 675 1, 357 675 1, 357 602 1
384 32 -9 347 555;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 191 481 1, 191 555 1, 264 555 1, 264 481 1
555 44 -14 507 722;507 29 1, 421 -14 0, 323 -14 1, 186 -14 0, 115 60 1, 44 135 0, 44 277 1, 44 419 0, 116 494 1, 189 569 0, 327 569 1, 404 569 0, 506 545 1, 506 471 1, 390 510 0, 323 510 1, 228 510 0, 178 450 1, 128 390 0, 128 278 1, 128 167 0, 182 108 1, 235 48 0, 332 48 1, 414 48 0, 507 96 1, 451 722 1, 361 602 1, 279 602 1, 189 722 1, 244 722 1, 320 646 1, 320 646 1, 396 722 1
384 32 -9 387 602;347 12 1, 279 -9 0, 219 -9 1, 135 -9 0, 84 50 1, 32 109 0, 32 204 1, 32 303 0, 85 360 1, 137 416 0, 231 416 1, 278 416 0, 343 403 1, 343 341 1, 281 360 0, 245 360 1, 116 360 0, 116 204 1, 116 130 0, 149 90 1, 182 50 0, 242 50 1, 287 50 0, 347 76 1, 387 602 1, 297 481 1, 215 481 1, 125 602 1, 180 602 1, 256 526 1, 256 526 1, 332 602 1
555 62 0 520 722;62 0 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 387 722 1, 297 602 1, 215 602 1, 125 722 1, 180 722 1, 255 646 1, 256 646 1, 332 722 1
472 32 -9 472 592;295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 592 1, 369 592 1, 369 0 1, 295 0 1, 398 422 1, 398 444 1, 427 452 0, 427 512 1, 427 518 1, 398 518 1, 398 592 1, 472 592 1, 472 528 1, 472 430 0
555 2 0 520 555;62 0 1, 62 255 1, 2 255 1, 2 314 1, 62 314 1, 62 555 1, 240 555 1, 520 555 0, 520 290 1, 520 152 0, 447 76 1, 374 0 0, 241 0 1, 141 59 1, 235 59 1, 435 59 0, 435 281 1, 435 412 0, 356 466 1, 333 482 0, 301 488 1, 263 496 0, 199 496 1, 141 496 1, 141 314 1, 266 314 1, 266 255 1, 141 255 1
427 32 -9 425 592;295 472 1, 175 472 1, 175 518 1, 295 518 1, 295 592 1, 369 592 1, 369 518 1, 425 518 1, 425 472 1, 369 472 1, 369 0 1, 295 0 1, 295 76 1, 274 38 0, 251 18 1, 218 -9 0, 173 -9 1, 110 -9 0, 71 46 1, 32 101 0, 32 193 1, 32 299 0, 83 358 1, 133 416 0, 224 416 1, 259 416 0, 295 407 1, 295 143 1, 295 351 1, 243 361 0, 218 361 1, 112 361 0, 112 200 1, 112 133 0, 133 94 1, 154 56 0, 189 56 1, 236 56 0
512 72 0 491 657;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 150 602 1, 150 657 1, 391 657 1, 391 602 1
427 32 -9 383 537;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 152 722 1, 198 722 1, 206 687 0, 226 672 1, 245 657 0, 276 657 1, 312 657 0, 332 675 1, 348 690 0, 355 722 1, 401 722 1, 395 672 0, 368 641 1, 333 602 0, 276 602 1, 218 602 0, 182 645 1, 158 674 0
427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 89 602 1, 135 602 1, 143 567 0, 163 551 1, 182 537 0, 213 537 1, 249 537 0, 269 555 1, 285 570 0, 292 602 1, 338 602 1, 332 551 0, 305 521 1, 269 481 0, 213 481 1, 155 481 0, 119 524 1, 95 553 0
512 72 0 491 675;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 238 602 1, 238 675 1, 312 675 1, 312 602 1
427 32 -9 383 555;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 155 481 1, 155 555 1, 229 555 1, 229 481 1
512 72 -139 491 555;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 403 0 1, 443 0 1, 395 -30 0, 395 -67 1, 395 -103 0, 438 -103 1, 458 -103 0, 472 -98 1, 472 -128 1, 449 -139 0, 420 -139 1, 344 -139 0, 344 -80 1, 344 -34 0
427 32 -139 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 251 0 1, 291 0 1, 243 -30 0, 243 -67 1, 243 -103 0, 286 -103 1, 306 -103 0, 320 -98 1, 320 -128 1, 297 -139 0, 268 -139 1, 192 -139 0, 192 -80 1, 192 -34 0
512 72 0 491 722;72 0 1, 72 555 1, 474 555 1, 474 496 1, 150 496 1, 150 318 1, 437 318 1, 437 260 1, 150 260 1, 150 59 1, 491 59 1, 491 0 1, 406 722 1, 315 602 1, 234 602 1, 143 722 1, 199 722 1, 274 646 1, 275 646 1, 350 722 1
427 32 -9 383 602;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
597 35 -14 527 722;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 194 602 1, 284 722 1, 366 722 1, 456 602 1, 401 602 1, 326 677 1, 325 677 1, 249 602 1
427 35 -158 372 602;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 93 481 1, 184 602 1, 266 602 1, 356 481 1, 300 481 1, 225 557 1, 224 557 1, 149 481 1
597 35 -14 527 722;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 200 722 1, 246 722 1, 254 687 0, 275 672 1, 294 657 0, 325 657 1, 360 657 0, 381 675 1, 397 690 0, 404 722 1, 450 722 1, 444 672 0, 417 641 1, 381 602 0, 325 602 1, 266 602 0, 231 645 1, 206 674 0
427 35 -158 381 602;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 131 602 1, 177 602 1, 185 566 0, 205 551 1, 225 537 0, 256 537 1, 291 537 0, 311 555 1, 328 570 0, 335 602 1, 381 602 1, 375 551 0, 347 521 1, 312 481 0, 256 481 1, 197 481 0, 161 524 1, 137 554 0
597 35 -14 527 675;527 258 1, 527 15 1, 424 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 288 602 1, 288 675 1, 362 675 1, 362 602 1
427 35 -158 372 555;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 183 481 1, 183 555 1, 257 555 1, 257 481 1
597 35 -162 527 569;527 258 1, 527 15 1, 423 -14 0, 327 -14 1, 35 -14 0, 35 276 1, 35 417 0, 110 493 1, 186 569 0, 329 569 1, 421 569 0, 526 544 1, 526 471 1, 406 510 0, 326 510 1, 119 510 0, 119 279 1, 119 165 0, 176 105 1, 233 45 0, 338 45 1, 381 45 0, 449 59 1, 449 200 1, 356 200 1, 356 258 1, 263 -158 1, 263 -126 1, 284 -129 0, 299 -129 1, 340 -129 0, 340 -104 1, 340 -77 0, 281 -71 1, 281 -42 1, 331 -43 0, 356 -54 1, 391 -69 0, 391 -105 1, 391 -162 0, 309 -162 1, 287 -162 0
427 35 -158 372 651;298 162 1, 298 351 1, 245 361 0, 222 361 1, 115 361 0, 115 215 1, 115 150 0, 136 112 1, 157 74 0, 192 74 1, 239 74 0, 298 95 1, 277 57 0, 254 37 1, 221 9 0, 176 9 1, 113 9 0, 74 64 1, 35 119 0, 35 207 1, 35 306 0, 85 361 1, 135 416 0, 226 416 1, 261 416 0, 298 407 1, 372 407 1, 372 111 1, 372 15 0, 362 -31 1, 334 -158 0, 174 -158 1, 106 -158 0, 38 -135 1, 38 -71 1, 118 -102 0, 173 -102 1, 298 -102 0, 298 31 1, 257 651 1, 257 629 1, 228 621 0, 228 561 1, 228 555 1, 257 555 1, 257 481 1, 183 481 1, 183 545 1, 183 644 0
555 62 0 492 722;62 0 1, 62 555 1, 141 555 1, 141 321 1, 414 321 1, 414 555 1, 492 555 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1, 146 602 1, 236 722 1, 318 722 1, 408 602 1, 353 602 1, 278 677 1, 277 677 1, 201 602 1
427 58 0 374 750;58 0 1, 58 592 1, 132 592 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 86 629 1, 176 750 1, 258 750 1, 348 629 1, 293 629 1, 217 705 1, 216 705 1, 141 629 1
555 6 0 548 555;141 321 1, 414 321 1, 414 416 1, 141 416 1, 62 0 1, 62 416 1, 6 416 1, 6 463 1, 62 463 1, 62 555 1, 141 555 1, 141 463 1, 414 463 1, 414 555 1, 492 555 1, 492 463 1, 548 463 1, 548 416 1, 492 416 1, 492 0 1, 414 0 1, 414 262 1, 141 262 1, 141 0 1
427 2 0 374 592;58 0 1, 58 472 1, 2 472 1, 2 518 1, 58 518 1, 58 592 1, 132 592 1, 132 518 1, 243 518 1, 243 472 1, 132 472 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
213 -18 0 232 689;68 0 1, 68 555 1, 146 555 1, 146 0 1, -18 602 1, -15 636 0, -6 656 1, 11 689 0, 52 689 1, 79 689 0, 102 675 1, 125 661 1, 146 648 0, 157 648 1, 182 648 0, 186 689 1, 232 689 1, 229 654 0, 220 635 1, 203 602 0, 162 602 1, 135 602 0, 112 616 1, 89 630 1, 69 643 0, 57 643 1, 32 643 0, 28 602 1
171 -40 0 210 569;48 0 1, 48 407 1, 122 407 1, 122 0 1, -40 481 1, -37 516 0, -28 535 1, -11 569 0, 30 569 1, 57 569 0, 80 555 1, 103 541 1, 124 528 0, 135 528 1, 160 528 0, 164 569 1, 210 569 1, 207 534 0, 198 515 1, 181 481 0, 141 481 1, 114 481 0, 90 496 1, 68 510 1, 47 522 0, 35 522 1, 11 522 0, 6 481 1
213 -14 0 227 657;68 0 1, 68 555 1, 146 555 1, 146 0 1, -14 602 1, -14 657 1, 227 657 1, 227 602 1
171 -56 0 184 537;48 0 1, 48 407 1, 122 407 1, 122 0 1, -56 481 1, -56 537 1, 184 537 1, 184 481 1
213 -18 0 232 722;68 0 1, 68 555 1, 146 555 1, 146 0 1, -18 722 1, 28 722 1, 36 687 0, 56 672 1, 76 657 0, 107 657 1, 142 657 0, 162 675 1, 179 690 0, 186 722 1, 232 722 1, 226 672 0, 198 641 1, 163 602 0, 107 602 1, 48 602 0, 12 645 1, -12 674 0
171 -40 0 210 602;48 0 1, 48 407 1, 122 407 1, 122 0 1, -40 602 1, 6 602 1, 14 566 0, 35 551 1, 54 537 0, 85 537 1, 120 537 0, 141 555 1, 157 570 0, 164 602 1, 210 602 1, 204 551 0, 177 521 1, 141 481 0, 85 481 1, 26 481 0, -9 524 1, -34 554 0
213 45 -139 173 555;68 0 1, 68 555 1, 146 555 1, 146 0 1, 104 0 1, 144 0 1, 96 -30 0, 96 -67 1, 96 -103 0, 140 -103 1, 159 -103 0, 173 -98 1, 173 -128 1, 150 -139 0, 121 -139 1, 45 -139 0, 45 -80 1, 45 -34 0
171 0 -139 128 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1, 59 0 1, 99 0 1, 51 -30 0, 51 -67 1, 51 -103 0, 94 -103 1, 114 -103 0, 128 -98 1, 128 -128 1, 105 -139 0, 76 -139 1, 0 -139 0, 0 -80 1, 0 -34 0
213 68 0 146 675;68 0 1, 68 555 1, 146 555 1, 146 0 1, 70 602 1, 70 675 1, 144 675 1, 144 602 1
564 68 -111 507 555;68 0 1, 68 555 1, 146 555 1, 146 0 1, 210 -87 1, 210 -19 1, 275 -48 0, 330 -48 1, 395 -48 0, 413 -18 1, 428 7 0, 428 68 1, 428 555 1, 507 555 1, 507 70 1, 507 -111 0, 327 -111 1, 266 -111 0
341 48 -157 316 555;48 0 1, 48 407 1, 122 407 1, 122 0 1, 48 481 1, 48 555 1, 122 555 1, 122 481 1, 134 -145 1, 134 -87 1, 164 -102 0, 190 -102 1, 227 -102 0, 235 -74 1, 242 -51 0, 242 0 1, 242 407 1, 316 407 1, 316 0 1, 316 -157 0, 196 -157 1, 163 -157 0, 242 481 1, 242 555 1, 316 555 1, 316 481 1
384 18 -111 398 722;18 -87 1, 18 -19 1, 83 -48 0, 138 -48 1, 203 -48 0, 221 -18 1, 236 7 0, 236 68 1, 236 555 1, 315 555 1, 315 70 1, 315 -111 0, 135 -111 1, 74 -111 0, 135 602 1, 226 722 1, 308 722 1, 398 602 1, 342 602 1, 267 677 1, 266 677 1, 191 602 1
171 -58 -157 212 602;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0, -50 481 1, 40 602 1, 122 602 1, 212 481 1, 156 481 1, 81 557 1, 80 557 1, 5 481 1
512 72 -162 494 555;72 0 1, 72 555 1, 146 555 1, 146 282 1, 376 555 1, 455 555 1, 232 290 1, 494 0 1, 394 0 1, 146 281 1, 146 0 1, 183 -158 1, 183 -126 1, 204 -129 0, 219 -129 1, 260 -129 0, 260 -104 1, 260 -77 0, 201 -71 1, 201 -42 1, 251 -43 0, 276 -54 1, 311 -69 0, 311 -105 1, 311 -162 0, 230 -162 1, 207 -162 0
384 58 -162 377 592;58 0 1, 58 592 1, 132 592 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
384 58 0 377 407;58 0 1, 58 407 1, 132 407 1, 132 210 1, 268 407 1, 339 407 1, 209 215 1, 377 0 1, 287 0 1, 132 209 1, 132 0 1
427 62 0 413 722;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 66 602 1, 157 722 1, 242 722 1, 122 602 1
171 40 0 216 730;48 0 1, 48 592 1, 122 592 1, 122 0 1, 40 609 1, 131 730 1, 216 730 1, 96 609 1
427 62 -162 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 168 -158 1, 168 -126 1, 190 -129 0, 205 -129 1, 246 -129 0, 246 -104 1, 246 -77 0, 187 -71 1, 187 -42 1, 237 -43 0, 262 -54 1, 297 -69 0, 297 -105 1, 297 -162 0, 215 -162 1, 193 -162 0
171 0 -162 128 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 0 -158 1, 0 -126 1, 21 -129 0, 36 -129 1, 77 -129 0, 77 -104 1, 77 -77 0, 18 -71 1, 18 -42 1, 68 -43 0, 93 -54 1, 128 -69 0, 128 -105 1, 128 -162 0, 47 -162 1, 25 -162 0
427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 252 385 1, 252 407 1, 280 415 0, 280 475 1, 280 481 1, 252 481 1, 252 555 1, 326 555 1, 326 491 1, 325 393 0
224 48 0 229 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 155 422 1, 155 444 1, 183 452 0, 183 512 1, 183 518 1, 155 518 1, 155 592 1, 229 592 1, 229 528 1, 228 430 0
427 62 0 413 555;62 0 1, 62 555 1, 141 555 1, 141 59 1, 413 59 1, 413 0 1, 279 241 1, 279 315 1, 353 315 1, 353 241 1
257 48 0 252 592;48 0 1, 48 592 1, 122 592 1, 122 0 1, 178 241 1, 178 315 1, 252 315 1, 252 241 1
427 6 0 413 555;62 0 1, 62 260 1, 6 230 1, 6 293 1, 62 323 1, 62 555 1, 141 555 1, 141 366 1, 233 416 1, 233 353 1, 141 303 1, 141 59 1, 413 59 1, 413 0 1
171 -3 0 173 592;48 0 1, 48 270 1, -3 243 1, -3 305 1, 48 333 1, 48 592 1, 123 592 1, 123 374 1, 173 399 1, 173 338 1, 123 311 1, 123 0 1
555 62 0 492 722;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 222 602 1, 312 722 1, 398 722 1, 277 602 1
427 58 0 374 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
555 62 -162 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 194 -158 1, 194 -126 1, 216 -129 0, 231 -129 1, 272 -129 0, 272 -104 1, 272 -77 0, 213 -71 1, 213 -42 1, 263 -43 0, 288 -54 1, 323 -69 0, 323 -105 1, 323 -162 0, 241 -162 1, 219 -162 0
427 58 -162 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
555 62 0 492 722;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 0 1, 415 0 1, 129 429 1, 129 0 1, 408 722 1, 318 602 1, 236 602 1, 146 722 1, 201 722 1, 277 646 1, 278 646 1, 353 722 1
427 58 0 374 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 0 1, 300 0 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
464 0 0 411 592;95 0 1, 95 407 1, 168 407 1, 168 331 1, 196 369 0, 222 388 1, 261 416 0, 307 416 1, 411 416 0, 411 293 1, 411 0 1, 336 0 1, 336 269 1, 336 318 0, 326 335 1, 315 353 0, 287 353 1, 227 353 0, 168 264 1, 168 0 1, 0 422 1, 0 444 1, 29 452 0, 29 512 1, 29 518 1, 0 518 1, 0 592 1, 74 592 1, 74 528 1, 74 430 0
555 62 -158 492 555;62 0 1, 62 555 1, 139 555 1, 425 126 1, 425 555 1, 492 555 1, 492 -35 1, 492 -158 0, 373 -158 1, 345 -158 0, 317 -150 1, 317 -92 1, 341 -102 0, 369 -102 1, 425 -102 0, 425 -21 1, 425 -15 1, 129 429 1, 129 0 1
427 58 -158 374 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 159 369 0, 186 388 1, 224 416 0, 270 416 1, 374 416 0, 374 293 1, 374 -35 1, 374 -158 0, 255 -158 1, 227 -158 0, 198 -150 1, 198 -92 1, 222 -102 0, 244 -102 1, 300 -102 0, 300 -21 1, 300 269 1, 300 318 0, 290 335 1, 279 353 0, 251 353 1, 190 353 0, 132 264 1, 132 0 1
597 35 -14 563 657;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 179 602 1, 179 657 1, 419 657 1, 419 602 1
427 32 -9 395 537;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 72 481 1, 72 537 1, 312 537 1, 312 481 1
597 35 -14 563 722;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 174 722 1, 220 722 1, 228 687 0, 248 672 1, 268 657 0, 299 657 1, 334 657 0, 354 675 1, 371 690 0, 378 722 1, 424 722 1, 418 672 0, 390 641 1, 355 602 0, 299 602 1, 240 602 0, 204 645 1, 180 674 0
427 32 -9 395 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 89 602 1, 135 602 1, 143 567 0, 163 551 1, 182 537 0, 213 537 1, 249 537 0, 269 555 1, 285 570 0, 292 602 1, 338 602 1, 332 551 0, 305 521 1, 269 481 0, 213 481 1, 155 481 0, 119 524 1, 95 553 0
597 35 -14 563 722;299 569 1, 419 569 0, 491 490 1, 563 410 0, 563 278 1, 563 144 0, 491 65 1, 419 -14 0, 295 -14 1, 189 -14 0, 121 51 1, 35 132 0, 35 278 1, 35 411 0, 107 490 1, 179 569 0, 299 510 1, 214 510 0, 167 449 1, 119 388 0, 119 278 1, 119 169 0, 167 107 1, 213 45 0, 297 45 1, 375 45 0, 421 95 1, 479 156 0, 479 278 1, 479 388 0, 431 449 1, 383 510 0, 212 602 1, 303 722 1, 374 722 1, 254 602 1, 344 602 1, 434 722 1, 506 722 1, 386 602 1
427 32 -9 403 602;213 416 1, 297 416 0, 346 359 1, 395 303 0, 395 204 1, 395 104 0, 346 47 1, 297 -9 0, 211 -9 1, 137 -9 0, 91 38 1, 32 96 0, 32 204 1, 32 302 0, 81 359 1, 130 416 0, 213 361 1, 112 361 0, 112 204 1, 112 46 0, 213 46 1, 315 46 0, 315 205 1, 315 361 0, 109 481 1, 199 602 1, 271 602 1, 151 481 1, 241 481 1, 331 602 1, 403 602 1, 283 481 1
555 62 0 538 722;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 196 602 1, 287 722 1, 372 722 1, 252 602 1
256 58 0 280 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 104 481 1, 195 602 1, 280 602 1, 160 481 1
555 62 -162 538 555;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 196 -158 1, 196 -126 1, 218 -129 0, 233 -129 1, 274 -129 0, 274 -104 1, 274 -77 0, 215 -71 1, 215 -42 1, 265 -43 0, 290 -54 1, 324 -69 0, 324 -105 1, 324 -162 0, 243 -162 1, 221 -162 0
256 58 -162 251 416;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
555 62 0 538 722;62 0 1, 62 555 1, 294 555 1, 465 555 0, 465 417 1, 465 350 0, 423 306 1, 399 281 0, 353 260 1, 538 0 1, 441 0 1, 283 235 1, 141 235 1, 141 0 1, 141 294 1, 229 294 1, 309 294 0, 346 321 1, 384 350 0, 384 408 1, 384 456 0, 353 476 1, 323 496 0, 253 496 1, 141 496 1, 368 722 1, 278 602 1, 196 602 1, 106 722 1, 161 722 1, 237 646 1, 237 646 1, 313 722 1
256 -3 0 259 602;58 0 1, 58 407 1, 132 407 1, 132 331 1, 148 369 0, 166 389 1, 193 416 0, 230 416 1, 237 416 0, 251 414 1, 251 345 1, 231 352 0, 219 352 1, 178 352 0, 132 269 1, 132 0 1, 259 602 1, 169 481 1, 87 481 1, -3 602 1, 52 602 1, 128 526 1, 128 526 1, 204 602 1
512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 196 602 1, 287 722 1, 372 722 1, 252 602 1
384 44 -9 344 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 168 481 1, 259 602 1, 344 602 1, 224 481 1
512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 120 602 1, 211 722 1, 293 722 1, 383 602 1, 327 602 1, 252 677 1, 251 677 1, 176 602 1
384 44 -9 341 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 75 481 1, 165 602 1, 247 602 1, 337 481 1, 282 481 1, 206 557 1, 206 557 1, 130 481 1
512 45 -162 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 147 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 225 0 1, 262 0 1, 239 -41 1, 266 -42 0, 286 -56 1, 312 -74 0, 312 -101 1, 312 -126 0, 290 -144 1, 268 -162 0, 236 -162 1, 211 -162 0, 182 -154 1, 182 -124 1, 201 -129 0, 221 -129 1, 260 -129 0, 260 -102 1, 260 -67 0, 190 -66 1
384 44 -162 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 171 0 1, 207 0 1, 184 -41 1, 211 -42 0, 231 -56 1, 257 -74 0, 257 -101 1, 257 -126 0, 235 -144 1, 213 -162 0, 181 -162 1, 156 -162 0, 127 -154 1, 127 -124 1, 146 -129 0, 166 -129 1, 205 -129 0, 205 -102 1, 205 -67 0, 135 -66 1
512 45 -14 466 722;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 146 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 383 722 1, 293 602 1, 211 602 1, 120 722 1, 176 722 1, 251 646 1, 252 646 1, 327 722 1
384 44 -9 341 602;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
469 8 -162 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 220 0 1, 256 0 1, 234 -41 1, 261 -42 0, 280 -56 1, 306 -74 0, 306 -101 1, 306 -126 0, 285 -144 1, 263 -162 0, 230 -162 1, 205 -162 0, 176 -154 1, 176 -124 1, 195 -129 0, 215 -129 1, 254 -129 0, 254 -102 1, 254 -67 0, 184 -66 1
213 11 -162 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 112 0 1, 149 0 1, 126 -41 1, 153 -42 0, 173 -56 1, 199 -74 0, 199 -101 1, 199 -126 0, 177 -144 1, 155 -162 0, 123 -162 1, 97 -162 0, 69 -154 1, 69 -124 1, 87 -129 0, 108 -129 1, 147 -129 0, 147 -102 1, 147 -67 0, 77 -66 1
469 8 0 461 722;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 366 722 1, 275 602 1, 194 602 1, 103 722 1, 159 722 1, 234 646 1, 235 646 1, 310 722 1
288 11 -9 270 633;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 196 463 1, 196 485 1, 224 493 0, 224 553 1, 224 559 1, 196 559 1, 196 633 1, 270 633 1, 270 569 1, 269 471 0
469 8 0 461 555;195 0 1, 195 268 1, 81 268 1, 81 324 1, 195 324 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 324 1, 387 324 1, 387 268 1, 274 268 1, 274 0 1
213 11 -9 210 488;57 213 1, 11 213 1, 11 259 1, 57 259 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 259 1, 210 259 1, 210 213 1, 131 213 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1
555 62 -14 492 689;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 157 602 1, 160 636 0, 169 656 1, 186 689 0, 227 689 1, 254 689 0, 277 675 1, 300 661 1, 321 648 0, 332 648 1, 357 648 0, 361 689 1, 407 689 1, 404 654 0, 395 635 1, 378 602 0, 338 602 1, 311 602 0, 287 616 1, 264 630 1, 244 643 0, 232 643 1, 207 643 0, 203 602 1
427 53 -9 369 569;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 86 481 1, 89 516 0, 98 535 1, 116 569 0, 156 569 1, 183 569 0, 206 555 1, 229 541 1, 250 528 0, 261 528 1, 286 528 0, 290 569 1, 336 569 1, 333 534 0, 324 515 1, 307 481 0, 267 481 1, 240 481 0, 216 496 1, 194 510 1, 173 522 0, 161 522 1, 137 522 0, 132 481 1
555 62 -14 492 657;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 162 602 1, 162 657 1, 402 657 1, 402 602 1
427 53 -9 369 537;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 72 481 1, 72 537 1, 312 537 1, 312 481 1
555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 157 722 1, 203 722 1, 211 687 0, 231 672 1, 251 657 0, 282 657 1, 317 657 0, 338 675 1, 354 690 0, 361 722 1, 407 722 1, 401 672 0, 374 641 1, 338 602 0, 282 602 1, 223 602 0, 188 645 1, 163 674 0
427 53 -9 369 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 86 602 1, 132 602 1, 140 567 0, 161 551 1, 180 537 0, 211 537 1, 246 537 0, 267 555 1, 283 570 0, 290 602 1, 336 602 1, 330 551 0, 303 521 1, 267 481 0, 211 481 1, 152 481 0, 117 524 1, 93 553 0
555 62 -14 492 762;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 282 762 1, 317 762 0, 342 738 1, 367 713 0, 367 678 1, 367 642 0, 342 617 1, 317 592 0, 281 592 1, 250 592 0, 227 612 1, 197 638 0, 197 677 1, 197 713 0, 222 737 1, 247 762 0, 282 730 1, 260 730 0, 245 714 1, 229 699 0, 229 677 1, 229 656 0, 245 640 1, 260 624 0, 281 624 1, 302 624 0, 316 637 1, 335 653 0, 335 678 1, 335 699 0, 319 714 1, 304 730 0
427 53 -9 369 651;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 192 651 1, 227 651 0, 252 627 1, 277 602 0, 277 567 1, 277 531 0, 252 506 1, 227 481 0, 191 481 1, 160 481 0, 137 501 1, 107 527 0, 107 566 1, 107 602 0, 132 626 1, 156 651 0, 192 619 1, 170 619 0, 154 603 1, 139 588 0, 139 566 1, 139 545 0, 154 529 1, 170 513 0, 191 513 1, 211 513 0, 226 526 1, 245 542 0, 245 567 1, 245 588 0, 229 603 1, 214 619 0
555 62 -14 492 722;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 187 602 1, 278 722 1, 349 722 1, 229 602 1, 319 602 1, 409 722 1, 481 722 1, 361 602 1
427 53 -9 403 602;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 109 481 1, 199 602 1, 271 602 1, 151 481 1, 241 481 1, 331 602 1, 403 602 1, 283 481 1
555 62 -139 492 555;62 555 1, 141 555 1, 141 205 1, 141 146 0, 151 118 1, 160 90 0, 187 71 1, 225 45 0, 288 45 1, 363 45 0, 393 80 1, 423 115 0, 423 202 1, 423 555 1, 492 555 1, 492 203 1, 492 129 0, 477 91 1, 463 52 0, 423 24 1, 370 -14 0, 281 -14 1, 168 -14 0, 115 39 1, 62 91 0, 62 206 1, 300 0 1, 340 0 1, 292 -30 0, 292 -67 1, 292 -103 0, 335 -103 1, 355 -103 0, 369 -98 1, 369 -128 1, 346 -139 0, 317 -139 1, 241 -139 0, 241 -80 1, 241 -34 0
427 53 -139 384 407;295 0 1, 295 76 1, 268 38 0, 242 19 1, 203 -9 0, 157 -9 1, 53 -9 0, 53 115 1, 53 407 1, 127 407 1, 127 139 1, 127 90 0, 137 72 1, 148 54 0, 176 54 1, 237 54 0, 295 143 1, 295 407 1, 369 407 1, 369 0 1, 315 0 1, 355 0 1, 307 -30 0, 307 -67 1, 307 -103 0, 350 -103 1, 370 -103 0, 384 -98 1, 384 -128 1, 361 -139 0, 332 -139 1, 256 -139 0, 256 -80 1, 256 -34 0
725 9 0 716 722;152 0 1, 9 555 1, 85 555 1, 199 117 1, 329 555 1, 405 555 1, 530 121 1, 651 555 1, 716 555 1, 560 0 1, 482 0 1, 358 428 1, 230 0 1, 236 602 1, 326 722 1, 408 722 1, 498 602 1, 443 602 1, 367 677 1, 366 677 1, 291 602 1
555 4 0 549 602;102 0 1, 4 407 1, 77 407 1, 150 101 1, 244 407 1, 318 407 1, 400 99 1, 486 407 1, 549 407 1, 435 0 1, 361 0 1, 275 315 1, 177 0 1, 149 481 1, 240 602 1, 321 602 1, 412 481 1, 356 481 1, 281 557 1, 280 557 1, 205 481 1
512 11 0 501 722;210 0 1, 210 231 1, 11 555 1, 101 555 1, 259 298 1, 428 555 1, 501 555 1, 289 233 1, 289 0 1, 134 602 1, 224 722 1, 306 722 1, 396 602 1, 341 602 1, 265 677 1, 264 677 1, 189 602 1
384 7 -148 380 602;152 0 1, 7 407 1, 82 407 1, 193 95 1, 314 407 1, 380 407 1, 164 -148 1, 87 -148 1, 67 481 1, 157 602 1, 239 602 1, 329 481 1, 274 481 1, 198 557 1, 198 557 1, 122 481 1
469 38 0 431 722;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 179 602 1, 269 722 1, 355 722 1, 234 602 1
384 28 0 356 602;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 168 481 1, 259 602 1, 344 602 1, 224 481 1
469 38 0 431 675;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 202 602 1, 202 675 1, 276 675 1, 276 602 1
384 28 0 356 555;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 155 481 1, 155 555 1, 229 555 1, 229 481 1
469 38 0 431 722;38 0 1, 38 63 1, 336 496 1, 56 496 1, 56 555 1, 431 555 1, 431 496 1, 132 63 1, 431 63 1, 431 0 1, 370 722 1, 280 602 1, 198 602 1, 108 722 1, 163 722 1, 239 646 1, 239 646 1, 315 722 1
384 28 0 356 602;28 0 1, 28 56 1, 261 352 1, 39 352 1, 39 407 1, 352 407 1, 352 352 1, 119 56 1, 356 56 1, 356 0 1, 323 602 1, 233 481 1, 151 481 1, 61 602 1, 116 602 1, 192 526 1, 192 526 1, 268 602 1
171 3 0 192 602;54 0 1, 54 352 1, 3 352 1, 3 407 1, 54 407 1, 54 456 1, 54 525 0, 84 563 1, 114 602 0, 167 602 1, 175 602 0, 192 600 1, 192 545 1, 181 546 0, 175 546 1, 128 546 0, 128 464 1, 128 0 1
512 45 -162 466 569;45 20 1, 45 98 1, 156 45 0, 264 45 1, 385 45 0, 385 135 1, 385 181 0, 352 203 1, 326 220 0, 269 239 1, 193 264 1, 48 311 0, 48 421 1, 48 569 0, 251 569 1, 338 569 0, 432 545 1, 432 473 1, 334 510 0, 246 510 1, 124 510 0, 124 427 1, 124 394 0, 147 374 1, 171 354 0, 230 334 1, 308 309 1, 395 281 0, 431 244 1, 466 207 0, 466 147 1, 466 72 0, 411 29 1, 357 -14 0, 261 -14 1, 167 -14 0, 197 -158 1, 197 -126 1, 218 -129 0, 233 -129 1, 274 -129 0, 274 -104 1, 274 -77 0, 215 -71 1, 215 -42 1, 265 -43 0, 290 -54 1, 325 -69 0, 325 -105 1, 325 -162 0, 243 -162 1, 221 -162 0
384 44 -162 341 416;44 14 1, 44 82 1, 118 46 0, 181 46 1, 266 46 0, 266 106 1, 266 147 0, 207 167 1, 141 189 1, 46 220 0, 46 303 1, 46 416 0, 201 416 1, 246 416 0, 309 404 1, 309 342 1, 253 361 0, 196 361 1, 119 361 0, 119 310 1, 119 273 0, 172 256 1, 231 237 1, 341 201 0, 341 113 1, 341 57 0, 297 24 1, 254 -9 0, 178 -9 1, 119 -9 0, 128 -158 1, 128 -126 1, 149 -129 0, 164 -129 1, 205 -129 0, 205 -104 1, 205 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -54 1, 256 -69 0, 256 -105 1, 256 -162 0, 175 -162 1, 153 -162 0
469 8 -162 461 555;195 0 1, 195 496 1, 8 496 1, 8 555 1, 461 555 1, 461 496 1, 274 496 1, 274 0 1, 177 -158 1, 177 -126 1, 198 -129 0, 213 -129 1, 254 -129 0, 254 -104 1, 254 -77 0, 195 -71 1, 195 -42 1, 245 -43 0, 270 -54 1, 305 -69 0, 305 -105 1, 305 -162 0, 224 -162 1, 201 -162 0
213 11 -162 210 488;199 -2 1, 176 -9 0, 156 -9 1, 57 -9 0, 57 113 1, 57 352 1, 11 352 1, 11 407 1, 57 407 1, 57 481 1, 131 488 1, 131 407 1, 210 407 1, 210 352 1, 131 352 1, 131 126 1, 131 78 0, 139 62 1, 147 46 0, 174 46 1, 188 46 0, 199 50 1, 64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
256 64 -162 192 -42;64 -158 1, 64 -126 1, 85 -129 0, 100 -129 1, 141 -129 0, 141 -104 1, 141 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -54 1, 192 -69 0, 192 -105 1, 192 -162 0, 111 -162 1, 89 -162 0
213 70 -120 144 407;70 -120 1, 70 -93 1, 96 -79 0, 96 -9 1, 96 0 1, 70 0 1, 70 74 1, 144 74 1, 144 12 1, 143 -102 0, 70 333 1, 70 407 1, 144 407 1, 144 333 1
213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
256 33 194 223 250;33 194 1, 33 250 1, 223 250 1, 223 194 1
427 38 204 390 250;38 204 1, 38 250 1, 390 250 1, 390 204 1
768 37 204 731 241;37 204 1, 37 241 1, 731 241 1, 731 204 1
213 0 0 0 0;
427 37 546 390 602;37 546 1, 37 602 1, 390 602 1, 390 546 1
427 32 -9 383 416;307 248 1, 306 284 0, 299 303 1, 280 361 0, 215 361 1, 169 361 0, 143 334 1, 117 308 0, 111 248 1, 380 72 1, 380 13 1, 304 -9 0, 240 -9 1, 145 -9 0, 89 50 1, 32 109 0, 32 209 1, 32 304 0, 82 360 1, 132 416 0, 216 416 1, 314 416 0, 354 347 1, 383 296 0, 382 215 1, 382 192 1, 110 192 1, 114 147 0, 125 124 1, 158 47 0, 256 47 1, 312 47 0
449 39 194 409 250;39 194 1, 39 250 1, 409 250 1, 409 194 1
128 -165 -14 293 569;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
213 60 184 153 277;60 184 1, 60 277 1, 153 277 1, 153 184 1
384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 181 602 1, 206 602 0, 236 592 1, 236 533 1, 209 546 0, 189 546 1, 162 546 0, 151 528 1, 140 510 0, 140 464 1, 140 407 1, 336 407 1, 336 0 1, 262 0 1, 262 352 1, 140 352 1, 140 0 1, 262 481 1, 262 555 1, 336 555 1, 336 481 1
384 12 0 336 602;66 0 1, 66 352 1, 12 352 1, 12 407 1, 66 407 1, 66 456 1, 66 602 0, 179 602 1, 262 592 1, 336 592 1, 336 0 1, 262 0 1, 262 537 1, 246 540 1, 214 546 0, 192 546 1, 159 546 0, 148 524 1, 140 505 0, 140 464 1, 140 407 1, 206 407 1, 206 352 1, 140 352 1, 140 0 1
256 1 222 251 555;154 222 1, 154 313 1, 1 313 1, 1 356 1, 152 555 1, 205 555 1, 205 357 1, 251 357 1, 251 313 1, 205 313 1, 205 222 1, 50 357 1, 154 357 1, 154 493 1
171 -58 -157 124 407;-58 -145 1, -58 -87 1, -28 -102 0, -2 -102 1, 35 -102 0, 43 -74 1, 50 -51 0, 50 0 1, 50 407 1, 124 407 1, 124 0 1, 124 -157 0, 4 -157 1, -29 -157 0
213 0 0 0 0;

View File

@ -0,0 +1,392 @@
freetype version 2.5.1
192 0 0 192 576;0 0 1, 0 576 1, 192 576 1, 192 0 1, 128 64 1, 128 512 1, 64 512 1, 64 64 1
0 0 0 0 0;
192 0 0 0 0;
192 0 0 0 0;
192 64 0 128 576;64 0 1, 64 64 1, 128 64 1, 128 0 1, 72 128 1, 64 454 1, 64 576 1, 128 576 1, 128 454 1, 120 128 1
256 0 384 256 576;44 384 1, 35 576 1, 108 576 1, 99 384 1, 173 384 1, 164 576 1, 238 576 1, 229 384 1
448 0 0 448 576;47 25 1, 89 192 1, 9 192 1, 18 256 1, 100 256 1, 133 320 1, 44 320 1, 54 384 1, 144 384 1, 186 551 1, 234 551 1, 192 384 1, 291 384 1, 332 551 1, 380 551 1, 339 384 1, 418 384 1, 409 320 1, 327 320 1, 294 256 1, 383 256 1, 374 192 1, 283 192 1, 242 25 1, 194 25 1, 235 192 1, 137 192 1, 95 25 1, 148 256 1, 247 256 1, 279 320 1, 180 320 1
448 64 -64 320 640;192 -46 1, 192 0 1, 135 0 0, 64 31 1, 64 95 1, 137 56 0, 192 56 1, 192 255 1, 124 298 0, 96 331 1, 64 368 0, 64 422 1, 64 486 0, 110 524 1, 142 550 0, 192 555 1, 192 602 1, 256 602 1, 256 555 1, 285 555 0, 320 530 1, 320 470 1, 282 500 0, 256 504 1, 256 307 1, 258 304 1, 263 298 0, 267 293 1, 270 290 1, 293 262 0, 305 237 1, 320 205 0, 320 155 1, 320 87 0, 297 42 1, 282 12 0, 256 0 1, 256 -46 1, 256 60 1, 256 85 0, 256 144 1, 256 175 0, 256 195 1, 256 210 0, 256 233 1, 192 331 1, 192 502 1, 128 479 0, 128 425 1, 128 376 0
704 64 0 640 576;94 0 1, 531 576 1, 589 576 1, 152 0 1, 160 576 1, 204 576 0, 230 542 1, 256 507 0, 256 448 1, 256 389 0, 230 355 1, 204 320 0, 160 320 1, 115 320 0, 90 355 1, 64 389 0, 64 450 1, 64 502 0, 85 535 1, 112 576 0, 160 512 1, 146 512 0, 137 495 1, 128 477 0, 128 449 1, 128 422 0, 135 405 1, 144 384 0, 160 384 1, 174 384 0, 183 402 1, 192 419 0, 192 448 1, 192 477 0, 183 494 1, 174 512 0, 512 320 1, 571 320 0, 606 277 1, 640 234 0, 640 160 1, 640 86 0, 606 43 1, 571 0 0, 512 0 1, 453 0 0, 418 43 1, 384 86 0, 384 162 1, 384 228 0, 412 269 1, 448 320 0, 512 256 1, 483 256 0, 466 230 1, 448 203 0, 448 162 1, 448 122 0, 462 96 1, 480 64 0, 512 64 1, 541 64 0, 558 91 1, 576 117 0, 576 160 1, 576 203 0, 558 229 1, 541 256 0
512 0 0 512 576;384 0 1, 357 35 1, 277 0 0, 205 0 1, 118 0 0, 59 52 1, 0 105 0, 0 185 1, 0 264 0, 56 313 1, 89 341 0, 152 363 1, 128 420 0, 128 461 1, 128 513 0, 163 545 1, 199 576 0, 260 576 1, 317 576 0, 351 548 1, 384 519 0, 384 472 1, 384 419 0, 335 381 1, 305 358 0, 248 337 1, 311 214 0, 373 133 1, 410 185 0, 410 287 1, 410 320 1, 483 320 1, 483 179 0, 408 90 1, 441 44 0, 485 0 1, 325 82 1, 251 173 0, 178 321 1, 127 303 0, 102 281 1, 64 249 0, 64 203 1, 64 145 0, 107 104 1, 151 64 0, 212 64 1, 260 64 0, 220 383 1, 266 396 0, 288 411 1, 320 433 0, 320 464 1, 320 512 0, 258 512 1, 192 512 0, 192 461 1, 192 431 0, 217 388 1
128 0 384 128 576;45 384 1, 27 576 1, 120 576 1, 101 384 1
256 64 -128 256 640;225 -60 1, 225 -111 1, 156 -58 0, 117 21 1, 64 123 0, 64 241 1, 64 364 0, 121 469 1, 160 541 0, 225 592 1, 225 541 1, 177 485 0, 155 426 1, 128 353 0, 128 241 1, 128 124 0, 158 48 1, 180 -7 0
256 0 -128 192 640;31 541 1, 31 592 1, 100 539 0, 140 460 1, 192 358 0, 192 241 1, 192 117 0, 135 12 1, 96 -60 0, 31 -111 1, 31 -60 1, 79 -3 0, 101 55 1, 128 129 0, 128 241 1, 128 357 0, 98 433 1, 77 487 0
320 0 256 320 576;267 483 1, 284 415 1, 180 383 1, 180 384 1, 180 389 0, 192 390 1, 192 390 1, 192 411 0, 170 423 1, 255 296 1, 210 266 1, 152 360 1, 171 362 0, 178 378 1, 88 266 1, 43 296 1, 120 378 1, 128 362 0, 147 360 1, 15 415 1, 32 483 1, 129 423 1, 118 410 0, 118 389 1, 118 389 1, 118 389 0, 118 387 1, 119 386 1, 119 384 0, 119 383 1, 122 576 1, 177 576 1, 165 427 1, 157 448 0, 149 448 1, 140 448 0, 133 427 1
448 64 64 384 384;192 64 1, 192 192 1, 64 192 1, 64 256 1, 192 256 1, 192 384 1, 256 384 1, 256 256 1, 384 256 1, 384 192 1, 256 192 1, 256 64 1
192 64 -192 128 64;64 -149 1, 64 -121 1, 89 -111 0, 89 -36 1, 89 -29 1, 64 -29 1, 64 64 1, 128 64 1, 128 -16 1, 128 -139 0
256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
192 64 0 128 64;64 0 1, 64 64 1, 128 64 1, 128 0 1
192 -64 -128 256 576;-22 -128 1, 178 576 1, 236 576 1, 36 -128 1
448 0 0 384 576;192 576 1, 280 576 0, 332 499 1, 384 422 0, 384 289 1, 384 154 0, 332 77 1, 280 0 0, 190 0 1, 112 0 0, 63 63 1, 0 142 0, 0 289 1, 0 422 0, 52 499 1, 104 576 0, 192 512 1, 130 512 0, 97 454 1, 64 395 0, 64 288 1, 64 183 0, 97 123 1, 130 64 0, 192 64 1, 248 64 0, 279 107 1, 320 165 0, 320 289 1, 320 397 0, 287 454 1, 252 512 0
448 64 0 384 640;64 0 1, 64 64 1, 192 64 1, 192 502 1, 64 474 1, 64 531 1, 256 577 1, 256 64 1, 384 64 1, 384 0 1
448 64 0 320 576;64 0 1, 64 64 1, 85 124 0, 134 187 1, 167 228 1, 197 266 1, 256 339 0, 256 414 1, 256 466 0, 232 491 1, 213 512 0, 178 512 1, 133 512 0, 64 486 1, 64 554 1, 129 576 0, 185 576 1, 247 576 0, 283 533 1, 320 490 0, 320 418 1, 320 368 0, 301 330 1, 282 290 0, 230 234 1, 208 211 1, 142 139 0, 129 64 1, 320 64 1, 320 0 1
448 64 0 384 576;64 4 1, 64 76 1, 67 76 1, 78 74 0, 83 74 1, 129 68 0, 146 66 1, 173 64 0, 196 64 1, 260 64 0, 292 94 1, 320 119 0, 320 167 1, 320 222 0, 272 251 1, 225 280 0, 137 280 1, 108 280 1, 108 332 1, 131 332 1, 191 333 0, 223 360 1, 256 387 0, 256 435 1, 256 512 0, 172 512 1, 129 512 0, 64 500 1, 64 568 1, 126 576 0, 174 576 1, 257 576 0, 293 534 1, 320 502 0, 320 450 1, 320 391 0, 287 353 1, 267 331 0, 228 312 1, 278 301 0, 303 288 1, 384 248 0, 384 165 1, 384 90 0, 332 45 1, 279 0 0, 194 0 1, 148 0 0
448 0 0 384 576;256 0 1, 256 128 1, 0 128 1, 0 187 1, 256 576 1, 320 576 1, 320 192 1, 384 192 1, 384 128 1, 320 128 1, 320 0 1, 75 192 1, 256 192 1, 256 473 1
448 64 -64 320 576;64 -2 1, 64 67 1, 113 64 0, 154 64 1, 202 64 0, 229 98 1, 256 132 0, 256 189 1, 256 320 0, 102 320 1, 83 320 0, 64 297 1, 64 576 1, 320 576 1, 320 512 1, 128 512 1, 128 359 1, 212 357 0, 259 319 1, 320 269 0, 320 173 1, 320 92 0, 274 46 1, 227 0 0, 146 0 1, 111 0 0
448 64 0 384 576;141 303 1, 187 384 0, 253 384 1, 314 384 0, 349 336 1, 384 288 0, 384 203 1, 384 110 0, 342 55 1, 300 0 0, 229 0 1, 152 0 0, 108 72 1, 64 144 0, 64 270 1, 64 414 0, 121 495 1, 179 576 0, 281 576 1, 327 576 0, 384 569 1, 384 502 1, 316 512 0, 278 512 1, 195 512 0, 162 434 1, 149 403 0, 144 364 1, 142 344 0, 229 320 1, 184 320 0, 156 288 1, 128 257 0, 128 203 1, 128 143 0, 157 103 1, 185 64 0, 231 64 1, 320 64 0, 320 187 1, 320 320 0
448 64 0 384 576;93 0 1, 103 68 0, 121 118 1, 139 168 0, 185 255 1, 321 512 1, 64 512 1, 64 576 1, 384 576 1, 384 512 1, 192 180 0, 169 0 1
448 64 0 384 576;147 313 1, 110 339 0, 91 363 1, 64 398 0, 64 438 1, 64 499 0, 110 537 1, 156 576 0, 230 576 1, 299 576 0, 342 543 1, 384 511 0, 384 457 1, 384 410 0, 347 367 1, 325 341 0, 283 313 1, 328 284 0, 351 254 1, 384 211 0, 384 155 1, 384 87 0, 338 43 1, 293 0 0, 221 0 1, 150 0 0, 107 41 1, 64 82 0, 64 150 1, 64 210 0, 94 257 1, 113 285 0, 242 338 1, 320 387 0, 320 441 1, 320 473 0, 294 493 1, 267 512 0, 222 512 1, 180 512 0, 154 494 1, 128 476 0, 128 445 1, 128 409 0, 173 378 1, 195 362 0, 188 282 1, 156 252 0, 143 229 1, 128 204 0, 128 165 1, 128 120 0, 155 92 1, 181 64 0, 225 64 1, 267 64 0, 293 88 1, 320 111 0, 320 149 1, 320 183 0, 298 206 1, 280 225 0, 236 253 1
448 64 0 384 576;308 273 1, 262 192 0, 195 192 1, 134 192 0, 99 240 1, 64 288 0, 64 373 1, 64 466 0, 106 521 1, 148 576 0, 218 576 1, 296 576 0, 340 504 1, 384 432 0, 384 306 1, 384 162 0, 327 81 1, 269 0 0, 168 0 1, 120 0 0, 64 7 1, 64 74 1, 133 64 0, 171 64 1, 254 64 0, 287 143 1, 300 173 0, 305 212 1, 307 232 0, 217 512 1, 128 512 0, 128 390 1, 128 256 0, 219 256 1, 264 256 0, 292 288 1, 320 320 0, 320 374 1, 320 433 0, 291 473 1, 262 512 0
192 64 0 128 384;64 0 1, 64 64 1, 128 64 1, 128 0 1, 64 320 1, 64 384 1, 128 384 1, 128 320 1
192 64 -128 128 384;64 -120 1, 64 -93 1, 87 -79 0, 87 -9 1, 87 0 1, 64 0 1, 64 64 1, 128 64 1, 128 10 1, 128 -102 0, 64 320 1, 64 384 1, 128 384 1, 128 320 1
448 0 0 384 448;384 37 1, 14 222 1, 384 407 1, 384 345 1, 139 222 1, 139 222 1, 384 99 1
448 64 128 384 320;64 128 1, 64 192 1, 384 192 1, 384 128 1, 64 256 1, 64 320 1, 384 320 1, 384 256 1
448 64 0 448 448;64 407 1, 434 222 1, 64 37 1, 64 99 1, 309 222 1, 309 222 1, 64 345 1
448 64 0 384 576;128 0 1, 128 64 1, 192 64 1, 192 0 1, 128 128 1, 128 150 1, 128 246 0, 201 297 1, 241 324 1, 320 377 0, 320 435 1, 320 512 0, 215 512 1, 150 512 0, 64 500 1, 64 568 1, 145 576 0, 213 576 1, 287 576 0, 330 550 1, 384 515 0, 384 441 1, 384 366 0, 301 319 1, 266 299 1, 222 275 0, 207 248 1, 192 222 0, 192 173 1, 192 128 1
768 64 0 704 576;470 17 1, 394 0 0, 325 0 1, 213 0 0, 138 64 1, 64 129 0, 64 229 1, 64 365 0, 177 471 1, 291 576 0, 439 576 1, 553 576 0, 628 510 1, 704 444 0, 704 346 1, 704 255 0, 647 191 1, 591 128 0, 511 128 1, 448 128 0, 448 167 1, 448 180 0, 451 202 1, 458 245 1, 453 245 1, 424 192 0, 398 166 1, 361 128 0, 320 128 1, 256 128 0, 256 210 1, 256 301 0, 312 374 1, 368 448 0, 439 448 1, 447 448 0, 461 448 1, 465 448 0, 469 448 1, 483 448 0, 492 448 1, 543 448 1, 513 235 1, 512 225 0, 512 215 1, 512 192 0, 536 192 1, 576 192 0, 608 237 1, 640 283 0, 640 341 1, 640 415 0, 581 463 1, 521 512 0, 430 512 1, 312 512 0, 220 428 1, 128 344 0, 128 238 1, 128 160 0, 188 112 1, 247 64 0, 339 64 1, 398 64 0, 456 56 1, 462 318 1, 477 393 1, 447 384 0, 426 384 1, 380 384 0, 350 341 1, 320 298 0, 320 237 1, 320 192 0, 345 192 1, 387 192 0
512 0 0 512 576;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1
512 64 0 448 576;64 0 1, 64 576 1, 227 576 1, 348 576 0, 398 546 1, 448 516 0, 448 443 1, 448 377 0, 396 336 1, 364 311 0, 304 292 1, 369 272 0, 401 244 1, 448 204 0, 448 140 1, 448 80 0, 410 41 1, 383 13 0, 340 6 1, 305 0 0, 247 0 1, 128 64 1, 186 64 1, 308 64 0, 346 80 1, 384 95 0, 384 144 1, 384 199 0, 335 227 1, 285 256 0, 192 256 1, 128 256 1, 128 320 1, 195 320 1, 384 320 0, 384 430 1, 384 486 0, 330 501 1, 288 512 0, 201 512 1, 128 512 1
576 64 0 512 576;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1
576 64 0 512 576;64 0 1, 64 576 1, 227 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 364 0 0, 228 0 1, 128 64 1, 223 64 1, 448 64 0, 448 292 1, 448 426 0, 360 481 1, 335 497 0, 299 504 1, 257 512 0, 186 512 1, 128 512 1
512 64 0 512 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1
448 64 0 448 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 384 320 1, 384 256 1, 128 256 1, 128 0 1
576 64 0 512 576;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1
576 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 320 1, 448 320 1, 448 576 1, 512 576 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1
192 64 0 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1
384 0 -128 320 576;0 -87 1, 0 -19 1, 75 -64 0, 141 -64 1, 216 -64 0, 238 -29 1, 256 0 0, 256 71 1, 256 576 1, 320 576 1, 320 73 1, 320 -128 0, 125 -128 1, 60 -128 0
512 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 293 1, 359 576 1, 438 576 1, 214 301 1, 476 0 1, 377 0 1, 128 292 1, 128 0 1
448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1
640 64 0 576 576;64 0 1, 64 576 1, 170 576 1, 327 151 1, 487 576 1, 576 576 1, 576 0 1, 512 0 1, 512 473 1, 357 64 1, 279 64 1, 128 475 1, 128 0 1
576 64 0 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1
576 64 0 576 576;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0
512 64 0 512 576;64 0 1, 64 576 1, 267 576 1, 365 576 0, 408 565 1, 451 553 0, 478 520 1, 512 479 0, 512 408 1, 512 192 0, 244 192 1, 128 192 1, 128 0 1, 128 256 1, 240 256 1, 448 256 0, 448 402 1, 448 473 0, 394 494 1, 348 512 0, 242 512 1, 128 512 1
576 64 -128 640 576;615 -48 1, 565 -111 1, 434 -68 0, 346 -10 1, 311 0 0, 293 0 1, 193 0 0, 128 81 1, 64 161 0, 64 289 1, 64 419 0, 133 497 1, 203 576 0, 319 576 1, 436 576 0, 506 495 1, 576 415 0, 576 280 1, 576 162 0, 517 87 1, 494 58 0, 464 38 1, 449 27 0, 418 11 1, 510 -30 0, 318 512 1, 229 512 0, 179 452 1, 128 393 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 409 64 0, 460 123 1, 512 181 0, 512 286 1, 512 383 0, 471 441 1, 420 512 0
576 64 0 576 576;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1
512 64 0 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0
448 0 0 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1
576 64 0 512 576;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1
512 0 0 512 576;228 0 1, 14 576 1, 95 576 1, 272 103 1, 441 576 1, 508 576 1, 302 0 1
704 0 0 768 576;152 0 1, 9 576 1, 85 576 1, 199 121 1, 329 576 1, 405 576 1, 530 125 1, 651 576 1, 716 576 1, 560 0 1, 482 0 1, 358 444 1, 230 0 1
512 0 0 512 576;11 0 1, 215 286 1, 20 576 1, 113 576 1, 263 352 1, 423 576 1, 498 576 1, 299 300 1, 502 0 1, 409 0 1, 251 233 1, 85 0 1
512 -64 0 512 576;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1
448 64 0 448 576;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1
192 64 -128 192 576;64 -128 1, 64 576 1, 192 576 1, 192 512 1, 128 512 1, 128 -64 1, 192 -64 1, 192 -128 1
192 -64 -128 256 576;236 -128 1, 178 -128 1, -22 576 1, 36 576 1
192 0 -128 128 576;128 576 1, 128 -128 1, 0 -128 1, 0 -64 1, 64 -64 1, 64 512 1, 0 512 1, 0 576 1
384 0 192 384 576;180 401 1, 75 192 1, 14 192 1, 180 525 1, 347 192 1, 284 192 1
448 0 -64 448 0;0 -64 1, 0 0 1, 448 0 1, 448 -64 1
256 0 512 256 576;216 512 1, 160 512 1, 40 576 1, 125 576 1
448 0 0 448 384;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0
448 64 -64 384 576;128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0, 128 312 1, 148 344 0, 171 361 1, 204 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 64 -5 1, 64 576 1, 128 576 1
384 0 0 320 384;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1
448 64 0 384 576;320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 576 1, 384 576 1, 384 0 1, 320 0 1
448 64 0 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0
192 0 0 256 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 433 1, 64 576 0, 194 576 1, 221 576 0, 256 569 1, 256 510 1, 219 512 0, 193 512 1, 157 512 0, 142 496 1, 128 481 0, 128 441 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
448 64 -192 384 384;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1
448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
192 64 0 128 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1
192 -64 -192 128 576;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1
384 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1
192 64 0 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1
640 64 0 576 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 156 353 0, 173 368 1, 194 384 0, 227 384 1, 268 384 0, 294 357 1, 309 342 0, 320 312 1, 357 354 0, 380 368 1, 408 384 0, 453 384 1, 576 384 0, 576 279 1, 576 0 1, 493 0 1, 493 257 1, 493 320 0, 432 320 1, 378 320 0, 320 257 1, 320 0 1, 256 0 1, 256 268 1, 256 320 0, 211 320 1, 171 320 0, 128 257 1, 128 0 1
448 64 0 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
448 64 0 384 384;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0
448 64 -128 384 384;128 -128 1, 64 -128 1, 64 384 1, 128 384 1, 128 312 1, 148 344 0, 171 361 1, 203 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0
448 64 -128 384 384;320 384 1, 384 384 1, 384 -128 1, 320 -128 1, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0
256 64 0 256 448;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1
384 64 0 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0
192 0 -64 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1
448 64 0 384 384;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1
384 0 0 384 384;152 0 1, 7 384 1, 82 384 1, 195 85 1, 314 384 1, 380 384 1, 225 0 1
576 0 0 576 384;102 0 1, 4 384 1, 77 384 1, 150 95 1, 244 384 1, 318 384 1, 400 94 1, 486 384 1, 549 384 1, 435 0 1, 361 0 1, 275 297 1, 177 0 1
384 0 0 384 384;11 0 1, 143 203 1, 15 384 1, 101 384 1, 203 240 1, 294 384 1, 362 384 1, 238 191 1, 372 0 1, 287 0 1, 177 154 1, 79 0 1
384 0 -128 384 384;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1
384 0 0 384 384;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1
256 0 -128 192 640;0 269 1, 22 269 1, 64 269 0, 64 330 1, 64 354 0, 64 382 1, 64 414 1, 64 447 0, 64 476 1, 64 537 0, 109 569 1, 141 591 0, 192 592 1, 192 537 1, 173 537 1, 153 537 0, 141 524 1, 128 510 0, 128 490 1, 128 483 0, 128 455 1, 128 417 1, 128 391 0, 128 361 1, 128 290 0, 80 241 1, 128 192 0, 128 120 1, 128 90 0, 128 65 1, 128 26 1, 128 -1 0, 128 -9 1, 128 -29 0, 141 -43 1, 154 -56 0, 173 -56 1, 192 -56 1, 192 -111 1, 139 -110 0, 106 -85 1, 64 -52 0, 64 6 1, 64 35 0, 64 67 1, 64 100 1, 64 127 0, 64 152 1, 64 213 0, 22 213 1, 0 213 1
192 64 -128 128 576;64 -128 1, 64 576 1, 128 576 1, 128 -128 1
256 64 -128 256 640;256 213 1, 234 213 1, 192 213 0, 192 152 1, 192 124 0, 192 100 1, 192 67 1, 192 36 0, 192 6 1, 192 -55 0, 146 -88 1, 114 -110 0, 64 -111 1, 64 -56 1, 82 -56 1, 102 -56 0, 115 -43 1, 128 -29 0, 128 -9 1, 128 1 0, 128 26 1, 128 65 1, 128 88 0, 128 120 1, 128 192 0, 176 241 1, 154 263 0, 144 285 1, 128 318 0, 128 361 1, 128 393 0, 128 417 1, 128 455 1, 128 480 0, 128 491 1, 128 510 0, 115 524 1, 102 537 0, 82 537 1, 64 537 1, 64 592 1, 117 591 0, 150 566 1, 192 534 0, 192 475 1, 192 445 0, 192 414 1, 192 382 1, 192 357 0, 192 329 1, 192 269 0, 234 269 1, 256 269 1
448 0 192 448 256;95 192 1, 39 192 1, 40 213 0, 47 223 1, 69 256 0, 139 256 1, 176 256 0, 214 256 1, 256 256 1, 280 256 1, 291 256 0, 309 256 1, 352 256 0, 354 256 1, 409 256 1, 408 235 0, 401 225 1, 379 192 0, 310 192 1, 273 192 0, 235 192 1, 193 192 1, 168 192 1, 158 192 0, 140 192 1, 96 192 0
512 -64 0 576 640;-15 0 1, 196 576 1, 316 576 1, 524 0 1, 439 0 1, 381 128 1, 116 128 1, 58 0 1, 138 192 1, 360 192 1, 246 458 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
512 0 0 512 768;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 256 768 1, 283 768 0, 301 740 1, 320 712 0, 320 672 1, 320 632 0, 301 604 1, 282 576 0, 255 576 1, 232 576 0, 215 599 1, 192 628 0, 192 672 1, 192 712 0, 211 740 1, 229 768 0, 256 704 1, 256 704 0, 256 695 1, 256 686 0, 256 672 1, 256 659 0, 256 650 1, 256 640 0, 256 640 1, 256 640 0, 256 648 1, 256 657 0, 256 672 1, 256 686 0, 256 695 1, 256 704 0
576 64 -192 512 576;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 293 0 1, 330 0 1, 307 -41 1, 336 -42 0, 356 -59 1, 384 -82 0, 384 -116 1, 384 -148 0, 361 -170 1, 338 -192 0, 306 -192 1, 280 -192 0, 250 -154 1, 250 -124 1, 267 -128 0, 285 -128 1, 320 -128 0, 320 -101 1, 320 -67 0, 258 -66 1
512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 211 576 1, 311 704 1, 407 704 1, 273 576 1
576 64 0 512 768;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 163 623 1, 166 656 0, 176 673 1, 195 704 0, 239 704 1, 268 704 0, 293 704 1, 318 704 1, 341 704 0, 353 704 1, 380 704 0, 384 710 1, 434 710 1, 431 682 0, 421 667 1, 403 640 0, 359 640 1, 329 640 0, 304 640 1, 279 640 1, 257 640 0, 244 640 1, 217 640 0, 213 623 1
576 64 0 512 640;288 576 1, 389 576 0, 451 498 1, 512 419 0, 512 289 1, 512 156 0, 451 78 1, 389 0 0, 285 0 1, 195 0 0, 137 64 1, 64 145 0, 64 288 1, 64 420 0, 125 498 1, 186 576 0, 288 512 1, 212 512 0, 170 453 1, 128 394 0, 128 288 1, 128 183 0, 170 124 1, 212 64 0, 286 64 1, 355 64 0, 397 112 1, 448 171 0, 448 289 1, 448 394 0, 406 453 1, 363 512 0, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
576 64 0 512 640;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
448 0 0 448 576;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 192 640 1, 219 640 0, 237 621 1, 256 603 0, 256 576 1, 256 549 0, 237 531 1, 219 512 0, 191 512 1, 168 512 0, 151 527 1, 128 547 0, 128 576 1, 128 603 0, 147 621 1, 165 640 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0
384 0 -192 320 384;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 235 0 1, 271 0 1, 248 -41 1, 275 -42 0, 294 -59 1, 320 -82 0, 320 -116 1, 320 -148 0, 298 -170 1, 277 -192 0, 244 -192 1, 219 -192 0, 191 -154 1, 191 -124 1, 207 -128 0, 224 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 199 -66 1
448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
448 0 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
192 0 0 256 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 40 512 1, 131 576 1, 216 576 1, 96 512 1
192 -64 0 192 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 152 512 1, 96 512 1, -24 576 1, 61 576 1
192 -128 0 256 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, -67 512 1, 23 576 1, 105 576 1, 195 512 1, 140 512 1, 64 552 1, 64 552 1, -12 512 1
192 0 0 192 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 0 512 1, 0 576 1, 64 576 1, 64 512 1, 128 512 1, 128 576 1, 192 576 1, 192 512 1
448 64 0 384 640;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 280 512 1, 224 512 1, 104 576 1, 189 576 1
448 0 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
448 64 0 384 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
448 64 0 384 640;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 67 502 1, 70 531 0, 79 548 1, 96 576 0, 137 576 1, 164 576 0, 187 576 1, 210 576 1, 231 576 0, 242 576 1, 267 576 0, 271 590 1, 317 590 1, 314 559 0, 305 542 1, 288 512 0, 247 512 1, 220 512 0, 197 512 1, 174 512 1, 154 512 0, 142 512 1, 117 512 0, 113 502 1
448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 280 512 1, 224 512 1, 104 576 1, 189 576 1
448 0 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 61 512 1, 151 576 1, 233 576 1, 323 512 1, 268 512 1, 192 552 1, 192 552 1, 116 512 1
448 64 0 384 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
448 64 -128 384 576;186 -128 1, 196 327 1, 64 317 1, 64 375 1, 196 365 1, 186 576 1, 262 576 1, 252 365 1, 384 375 1, 384 317 1, 252 327 1, 262 -128 1
320 64 384 256 576;160 576 1, 199 576 0, 228 548 1, 256 520 0, 256 480 1, 256 440 0, 228 412 1, 199 384 0, 159 384 1, 124 384 0, 98 407 1, 64 437 0, 64 480 1, 64 520 0, 92 548 1, 121 576 0, 160 512 1, 147 512 0, 137 503 1, 128 493 0, 128 480 1, 128 467 0, 137 457 1, 147 448 0, 160 448 1, 172 448 0, 181 456 1, 192 465 0, 192 480 1, 192 493 0, 183 503 1, 173 512 0
448 0 0 384 576;192 0 1, 192 65 1, 113 74 0, 65 120 1, 0 181 0, 0 278 1, 0 379 0, 66 436 1, 112 475 0, 192 486 1, 192 555 1, 256 555 1, 256 486 1, 316 484 0, 384 468 1, 384 406 1, 304 428 0, 256 432 1, 256 117 1, 317 117 0, 384 143 1, 384 87 1, 317 65 0, 256 65 1, 256 0 1, 192 429 1, 161 426 0, 145 420 1, 64 390 0, 64 277 1, 64 199 0, 112 159 1, 140 136 0, 192 122 1
448 64 0 384 640;64 0 1, 64 64 1, 128 88 0, 128 176 1, 128 256 1, 64 256 1, 64 320 1, 128 320 1, 128 410 1, 128 491 0, 170 533 1, 211 576 0, 291 576 1, 333 576 0, 384 579 1, 384 510 1, 325 512 0, 277 512 1, 192 512 0, 192 434 1, 192 320 1, 256 320 1, 256 256 1, 192 256 1, 192 211 1, 192 147 0, 176 116 1, 164 89 0, 136 64 1, 384 64 1, 384 0 1
448 64 -128 384 576;64 -77 1, 64 -9 1, 155 -64 0, 214 -64 1, 260 -64 0, 290 -45 1, 320 -25 0, 320 7 1, 320 36 0, 298 52 1, 279 66 0, 235 86 1, 170 116 1, 64 164 0, 64 247 1, 64 303 0, 123 363 1, 64 398 0, 64 449 1, 64 506 0, 115 541 1, 166 576 0, 249 576 1, 306 576 0, 384 572 1, 384 512 1, 301 512 0, 245 512 1, 192 512 0, 160 494 1, 128 476 0, 128 447 1, 128 409 0, 194 383 1, 246 364 1, 324 334 0, 354 306 1, 384 278 0, 384 236 1, 384 186 0, 342 125 1, 384 83 0, 384 14 1, 384 -51 0, 335 -89 1, 287 -128 0, 207 -128 1, 151 -128 0, 304 149 1, 320 187 0, 320 221 1, 320 249 0, 303 266 1, 285 284 0, 241 303 1, 161 338 1, 128 302 0, 128 270 1, 128 219 0, 220 183 1
256 0 192 192 384;96 384 1, 136 384 0, 164 356 1, 192 327 0, 192 287 1, 192 248 0, 164 220 1, 135 192 0, 94 192 1, 60 192 0, 34 215 1, 0 245 0, 0 288 1, 0 328 0, 28 356 1, 56 384 0
384 64 -128 320 576;192 -111 1, 192 280 1, 136 287 0, 105 321 1, 64 366 0, 64 446 1, 64 516 0, 93 546 1, 123 576 0, 192 576 1, 320 576 1, 320 -111 1, 256 -111 1, 256 512 1, 256 512 1, 256 -111 1
448 64 0 448 576;64 0 1, 64 432 1, 64 513 0, 100 545 1, 138 576 0, 232 576 1, 384 576 0, 384 480 1, 384 434 0, 313 385 1, 256 345 0, 256 327 1, 256 303 0, 302 274 1, 377 225 1, 448 180 0, 448 113 1, 448 0 0, 306 0 1, 244 0 0, 192 11 1, 192 76 1, 265 64 0, 310 64 1, 384 64 0, 384 115 1, 384 149 0, 336 179 1, 246 234 1, 192 267 0, 192 305 1, 192 337 0, 261 387 1, 320 430 0, 320 459 1, 320 512 0, 227 512 1, 172 512 0, 150 501 1, 128 490 0, 128 463 1, 128 0 1
576 0 0 576 576;288 576 1, 407 576 0, 492 492 1, 576 407 0, 576 288 1, 576 168 0, 491 84 1, 407 0 0, 284 0 1, 180 0 0, 102 68 1, 0 157 0, 0 288 1, 0 407 0, 84 492 1, 169 576 0, 288 512 1, 196 512 0, 130 446 1, 64 380 0, 64 288 1, 64 197 0, 129 130 1, 195 64 0, 285 64 1, 370 64 0, 432 117 1, 512 185 0, 512 288 1, 512 381 0, 446 446 1, 380 512 0, 192 128 1, 192 448 1, 302 448 1, 384 448 0, 384 370 1, 384 315 0, 340 277 1, 431 128 1, 375 128 1, 294 262 1, 256 262 1, 256 128 1, 256 301 1, 267 301 1, 320 301 0, 320 363 1, 320 415 0, 280 415 1, 256 415 1
576 0 0 576 576;288 576 1, 407 576 0, 492 492 1, 576 407 0, 576 288 1, 576 168 0, 491 84 1, 407 0 0, 284 0 1, 180 0 0, 102 68 1, 0 157 0, 0 288 1, 0 407 0, 84 492 1, 169 576 0, 288 512 1, 196 512 0, 130 446 1, 64 380 0, 64 288 1, 64 197 0, 129 130 1, 195 64 0, 285 64 1, 370 64 0, 432 117 1, 512 185 0, 512 288 1, 512 381 0, 446 446 1, 380 512 0, 384 142 1, 330 128 0, 288 128 1, 218 128 0, 173 173 1, 128 217 0, 128 288 1, 128 360 0, 172 404 1, 216 448 0, 291 448 1, 329 448 0, 375 441 1, 384 439 1, 384 393 1, 335 384 0, 297 384 1, 250 384 0, 221 357 1, 192 330 0, 192 287 1, 192 243 0, 222 218 1, 252 192 0, 303 192 1, 342 192 0, 384 188 1
768 64 256 640 576;192 256 1, 192 512 1, 99 512 1, 99 576 1, 341 576 1, 341 512 1, 256 512 1, 256 256 1, 384 256 1, 384 576 1, 476 576 1, 521 372 1, 564 576 1, 640 576 1, 640 256 1, 576 256 1, 576 474 1, 529 279 1, 495 279 1, 448 454 1, 448 256 1
256 0 512 256 576;40 512 1, 131 576 1, 216 576 1, 96 512 1
256 0 512 256 576;0 512 1, 0 576 1, 64 576 1, 64 512 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
192 0 0 0 0;
768 0 0 768 576;227 192 1, 384 192 1, 384 473 1, 10 0 1, 363 576 1, 704 576 1, 704 512 1, 448 512 1, 448 320 1, 704 320 1, 704 256 1, 448 256 1, 448 64 1, 768 64 1, 768 0 1, 384 0 1, 384 128 1, 190 128 1, 92 0 1
576 0 0 576 576;39 0 1, 104 65 1, 86 104 0, 77 144 1, 64 203 0, 64 279 1, 64 414 0, 131 495 1, 198 576 0, 309 576 1, 394 576 0, 459 529 1, 498 576 1, 563 576 1, 496 484 1, 531 447 0, 550 409 1, 576 353 0, 576 283 1, 576 154 0, 502 77 1, 428 0 0, 304 0 1, 213 0 0, 142 32 1, 104 0 1, 184 83 1, 238 64 0, 312 64 1, 406 64 0, 459 119 1, 512 174 0, 512 273 1, 512 351 0, 448 405 1, 416 459 1, 367 512 0, 302 512 1, 220 512 0, 174 449 1, 128 387 0, 128 275 1, 128 184 0, 152 122 1
192 0 0 0 0;
448 64 0 384 448;192 128 1, 192 256 1, 64 256 1, 64 320 1, 192 320 1, 192 448 1, 256 448 1, 256 320 1, 384 320 1, 384 256 1, 256 256 1, 256 128 1, 64 0 1, 64 64 1, 384 64 1, 384 0 1
192 0 0 0 0;
192 0 0 0 0;
448 0 0 448 576;192 0 1, 192 128 1, 81 128 1, 81 192 1, 192 192 1, 192 192 1, 81 192 1, 81 256 1, 192 256 1, 31 576 1, 117 576 1, 232 335 1, 232 335 1, 350 576 1, 416 576 1, 256 256 1, 367 256 1, 367 192 1, 256 192 1, 256 192 1, 367 192 1, 367 128 1, 256 128 1, 256 0 1
448 64 -128 384 384;64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 320 0 1, 320 72 1, 252 0 0, 184 0 1, 156 0 0, 128 9 1, 128 -128 1, 64 -128 1
192 0 0 0 0;
192 0 0 0 0;
192 0 0 0 0;
192 0 0 0 0;
192 0 0 0 0;
256 64 320 320 576;196 364 1, 162 320 0, 129 320 1, 100 320 0, 82 341 1, 64 363 0, 64 394 1, 64 485 0, 174 485 1, 192 485 1, 192 511 1, 192 512 0, 147 512 1, 110 512 0, 68 530 1, 68 572 1, 118 576 0, 161 576 1, 256 576 0, 256 513 1, 256 401 1, 256 383 0, 276 384 1, 279 384 1, 280 384 0, 282 384 1, 284 384 0, 286 368 1, 289 336 1, 268 320 0, 250 320 1, 209 320 0, 198 364 1, 192 395 1, 192 452 1, 178 452 1, 128 452 0, 128 413 1, 128 384 0, 154 384 1, 172 384 0
256 0 320 256 576;128 576 1, 187 576 0, 222 542 1, 256 507 0, 256 449 1, 256 389 0, 222 354 1, 187 320 0, 127 320 1, 74 320 0, 41 348 1, 0 384 0, 0 448 1, 0 507 0, 35 541 1, 69 576 0, 128 512 1, 64 512 0, 64 448 1, 64 384 0, 128 384 1, 192 384 0, 192 449 1, 192 512 0
192 0 0 0 0;
704 0 0 704 384;320 92 1, 320 198 1, 290 199 1, 263 200 0, 233 196 1, 128 183 0, 128 121 1, 128 64 0, 208 64 1, 264 64 0, 371 353 1, 423 384 0, 489 384 1, 642 384 0, 642 218 1, 642 192 1, 387 192 1, 391 153 0, 400 133 1, 431 64 0, 526 64 1, 578 64 0, 640 72 1, 640 13 1, 569 0 0, 510 0 1, 444 0 0, 399 29 1, 374 45 0, 351 77 1, 298 36 0, 260 19 1, 215 0 0, 153 0 1, 84 0 0, 42 30 1, 0 61 0, 0 110 1, 0 248 0, 300 248 1, 320 248 1, 320 290 1, 320 307 0, 298 313 1, 277 320 0, 223 320 1, 147 320 0, 64 318 1, 64 367 1, 151 384 0, 230 384 1, 325 384 0, 390 256 1, 574 256 1, 573 276 0, 567 287 1, 549 320 0, 487 320 1, 444 320 0, 419 305 1, 396 290 0
448 0 0 448 448;131 21 1, 108 0 1, 54 0 1, 99 50 1, 64 108 0, 64 189 1, 64 280 0, 111 332 1, 158 384 0, 240 384 1, 298 384 0, 339 363 1, 362 448 1, 416 448 1, 371 334 1, 448 276 0, 448 196 1, 448 105 0, 394 53 1, 340 0 0, 246 0 1, 180 0 0, 169 71 1, 170 71 1, 190 67 0, 207 66 1, 229 64 0, 253 64 1, 384 64 0, 384 200 1, 384 241 0, 325 275 1, 301 313 1, 300 313 1, 271 320 0, 233 320 1, 128 320 0, 128 186 1, 128 140 0, 145 109 1
448 64 -192 384 384;320 384 1, 320 320 1, 256 320 1, 256 384 1, 320 256 1, 320 236 1, 320 139 0, 247 89 1, 207 62 1, 128 7 0, 128 -50 1, 128 -128 0, 234 -128 1, 298 -128 0, 384 -78 1, 384 -141 1, 304 -192 0, 236 -192 1, 161 -192 0, 118 -165 1, 64 -131 0, 64 -55 1, 64 21 0, 147 68 1, 182 88 1, 226 113 0, 241 139 1, 256 166 0, 256 215 1, 256 256 1
256 64 -128 128 384;128 384 1, 128 320 1, 64 320 1, 64 384 1, 120 256 1, 128 -32 1, 128 -128 1, 64 -128 1, 64 -32 1, 72 256 1
448 64 128 384 320;64 256 1, 64 320 1, 384 320 1, 384 128 1, 320 128 1, 320 256 1
192 0 0 0 0;
448 0 -128 448 640;51 -128 1, 118 256 1, 64 256 1, 64 320 1, 128 320 1, 135 361 1, 174 576 0, 310 576 1, 346 576 0, 389 579 1, 378 515 1, 339 512 0, 307 512 1, 230 512 0, 208 394 1, 194 320 1, 256 320 1, 256 256 1, 184 256 1, 118 -128 1
192 0 0 0 0;
192 0 0 0 0;
448 0 0 384 384;376 342 1, 265 204 1, 376 65 1, 339 37 1, 191 204 1, 339 370 1, 228 342 1, 117 204 1, 228 65 1, 191 37 1, 43 204 1, 191 370 1
448 0 0 384 384;51 65 1, 162 204 1, 51 342 1, 88 370 1, 236 204 1, 88 37 1, 199 65 1, 310 204 1, 199 342 1, 236 370 1, 384 204 1, 236 37 1
768 64 0 704 64;64 0 1, 64 64 1, 128 64 1, 128 0 1, 320 0 1, 320 64 1, 384 64 1, 384 0 1, 640 0 1, 640 64 1, 704 64 1, 704 0 1
448 0 0 0 0;
512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 312 576 1, 257 576 1, 137 704 1, 222 704 1
512 0 0 512 768;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 132 623 1, 135 655 0, 144 673 1, 161 704 0, 202 704 1, 229 704 0, 252 704 1, 275 704 1, 296 704 0, 307 704 1, 332 704 0, 336 710 1, 382 710 1, 379 682 0, 370 667 1, 353 640 0, 312 640 1, 285 640 0, 262 640 1, 239 640 1, 219 640 0, 207 640 1, 182 640 0, 178 623 1
576 64 0 576 768;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 174 623 1, 177 655 0, 186 673 1, 203 704 0, 244 704 1, 271 704 0, 294 704 1, 316 704 1, 337 704 0, 349 704 1, 373 704 0, 377 710 1, 423 710 1, 420 682 0, 411 667 1, 394 640 0, 354 640 1, 327 640 0, 303 640 1, 281 640 1, 260 640 0, 248 640 1, 224 640 0, 220 623 1
768 64 0 768 576;448 0 1, 448 24 1, 387 0 0, 317 0 1, 203 0 0, 134 79 1, 64 159 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 576 1, 388 576 0, 448 553 1, 448 576 1, 704 576 1, 704 512 1, 512 512 1, 512 320 1, 704 320 1, 704 256 1, 512 256 1, 512 64 1, 768 64 1, 768 0 1, 448 212 1, 448 345 1, 448 433 0, 416 472 1, 384 512 0, 314 512 1, 226 512 0, 177 453 1, 128 394 0, 128 288 1, 128 182 0, 177 123 1, 227 64 0, 314 64 1, 448 64 0
704 64 0 704 384;396 332 1, 420 355 0, 447 367 1, 486 384 0, 540 384 1, 637 384 0, 675 325 1, 703 282 0, 704 192 1, 437 192 1, 444 129 0, 471 100 1, 506 64 0, 585 64 1, 643 64 0, 704 73 1, 704 14 1, 632 0 0, 566 0 1, 499 0 0, 459 19 1, 429 33 0, 398 65 1, 376 36 0, 349 22 1, 310 0 0, 255 0 1, 168 0 0, 116 52 1, 64 104 0, 64 192 1, 64 281 0, 116 332 1, 168 384 0, 256 384 1, 313 384 0, 353 364 1, 375 353 0, 261 320 1, 128 320 0, 128 193 1, 128 138 0, 154 106 1, 187 64 0, 262 64 1, 384 64 0, 384 192 1, 384 251 0, 359 283 1, 329 320 0, 439 256 1, 625 256 1, 624 282 0, 612 296 1, 592 320 0, 539 320 1, 487 320 0, 462 299 1, 445 284 0
448 0 192 448 256;38 192 1, 38 256 1, 390 256 1, 390 192 1
768 0 192 768 256;37 192 1, 37 256 1, 731 256 1, 731 192 1
256 0 384 256 640;256 578 1, 256 551 1, 233 537 0, 233 467 1, 233 458 1, 256 458 1, 256 384 1, 192 384 1, 192 446 1, 192 559 0, 64 578 1, 64 551 1, 41 537 0, 41 467 1, 41 458 1, 64 458 1, 64 384 1, 0 384 1, 0 446 1, 0 559 0
256 0 320 256 576;0 382 1, 0 409 1, 23 423 0, 23 493 1, 23 502 1, 0 502 1, 0 576 1, 64 576 1, 64 514 1, 64 401 0, 192 382 1, 192 409 1, 215 423 0, 215 493 1, 215 502 1, 192 502 1, 192 576 1, 256 576 1, 256 514 1, 256 401 0
192 64 384 128 640;128 597 1, 128 569 1, 103 559 0, 103 484 1, 103 476 1, 128 476 1, 128 384 1, 64 384 1, 64 464 1, 64 586 0
192 64 320 128 576;64 363 1, 64 391 1, 89 401 0, 89 476 1, 89 483 1, 64 483 1, 64 576 1, 128 576 1, 128 496 1, 128 372 0
448 64 0 384 448;64 192 1, 64 256 1, 384 256 1, 384 192 1, 192 384 1, 192 448 1, 256 448 1, 256 384 1, 192 0 1, 192 64 1, 256 64 1, 256 0 1
192 0 0 0 0;
384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
512 -64 0 576 640;192 0 1, 192 240 1, -19 576 1, 71 576 1, 227 309 1, 441 576 1, 514 576 1, 256 242 1, 256 0 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
128 -192 -64 320 576;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
448 0 64 384 448;137 145 1, 78 87 1, 46 120 1, 104 178 1, 64 217 0, 64 255 1, 64 292 0, 104 331 1, 46 390 1, 78 423 1, 137 364 1, 174 384 0, 214 384 1, 253 384 0, 290 364 1, 348 423 1, 381 390 1, 323 331 1, 320 292 0, 320 255 1, 320 217 0, 323 178 1, 381 120 1, 348 87 1, 290 145 1, 253 128 0, 214 128 1, 174 128 0, 192 320 1, 165 320 0, 146 302 1, 128 283 0, 128 256 1, 128 229 0, 146 211 1, 165 192 0, 191 192 1, 216 192 0, 233 207 1, 256 226 0, 256 256 1, 256 283 0, 238 302 1, 219 320 0
256 0 0 256 384;213 342 1, 102 204 1, 213 65 1, 176 37 1, 28 204 1, 176 370 1
256 0 0 256 384;43 65 1, 154 204 1, 43 342 1, 80 370 1, 228 204 1, 80 37 1
384 0 0 320 640;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 64 640 0, 194 640 1, 221 640 0, 256 613 1, 256 557 1, 219 576 0, 193 576 1, 157 576 0, 142 555 1, 128 534 0, 128 482 1, 128 384 1, 320 384 1, 320 0 1, 256 0 1, 256 320 1, 128 320 1, 128 0 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
384 0 0 320 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 435 1, 64 576 0, 175 576 1, 256 576 1, 320 576 1, 320 0 1, 256 0 1, 256 518 1, 240 516 1, 206 512 0, 183 512 1, 148 512 0, 137 493 1, 128 477 0, 128 443 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
448 64 -128 384 576;183 -128 1, 192 97 1, 64 86 1, 64 144 1, 192 134 1, 192 327 1, 64 317 1, 64 375 1, 192 365 1, 183 576 1, 265 576 1, 256 365 1, 384 375 1, 384 317 1, 256 327 1, 256 134 1, 384 144 1, 384 86 1, 256 97 1, 265 -128 1
192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
192 64 -192 128 64;64 -140 1, 64 -112 1, 89 -102 0, 89 -36 1, 89 -29 1, 64 -29 1, 64 64 1, 128 64 1, 128 -16 1, 128 -130 0
256 0 -192 256 64;0 -130 1, 0 -103 1, 23 -89 0, 23 -19 1, 23 -10 1, 0 -10 1, 0 64 1, 64 64 1, 64 2 1, 64 -111 0, 192 -130 1, 192 -103 1, 215 -89 0, 215 -19 1, 215 -10 1, 192 -10 1, 192 64 1, 256 64 1, 256 2 1, 256 -111 0
768 0 -64 768 640;128 576 1, 186 576 0, 221 541 1, 256 507 0, 256 448 1, 256 388 0, 221 354 1, 187 320 0, 126 320 1, 75 320 0, 42 348 1, 0 384 0, 0 448 1, 0 507 0, 35 541 1, 70 576 0, 127 512 1, 64 512 0, 64 448 1, 64 384 0, 128 384 1, 192 384 0, 192 448 1, 192 477 0, 175 495 1, 157 512 0, 384 320 1, 443 320 0, 477 277 1, 512 234 0, 512 160 1, 512 86 0, 477 43 1, 443 0 0, 383 0 1, 330 0 0, 298 35 1, 256 80 0, 256 160 1, 256 234 0, 291 277 1, 326 320 0, 383 256 1, 320 256 0, 320 160 1, 320 64 0, 384 64 1, 448 64 0, 448 159 1, 448 204 0, 431 230 1, 413 256 0, 640 320 1, 699 320 0, 733 277 1, 768 234 0, 768 161 1, 768 86 0, 733 43 1, 698 0 0, 639 0 1, 587 0 0, 553 35 1, 512 80 0, 512 160 1, 512 234 0, 547 277 1, 581 320 0, 639 256 1, 576 256 0, 576 160 1, 576 64 0, 640 64 1, 704 64 0, 704 160 1, 704 204 0, 686 230 1, 669 256 0, 23 -14 1, 431 590 1, 482 590 1, 74 -14 1
512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 126 576 1, 216 704 1, 298 704 1, 388 576 1, 333 576 1, 257 657 1, 257 657 1, 181 576 1
512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 127 576 1, 228 704 1, 319 704 1, 420 576 1, 358 576 1, 274 657 1, 273 657 1, 189 576 1
512 0 0 512 704;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 201 576 1, 292 704 1, 377 704 1, 257 576 1
512 64 0 512 640;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 192 576 1, 192 640 1, 256 640 1, 256 576 1, 320 576 1, 320 640 1, 384 640 1, 384 576 1
512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 334 576 1, 273 576 1, 138 704 1, 234 704 1
192 0 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 48 576 1, 124 704 1, 209 704 1, 96 576 1
192 -64 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, -28 576 1, 62 704 1, 130 704 1, 220 576 1, 164 576 1, 96 657 1, 96 657 1, 28 576 1
192 0 0 192 640;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 576 1, 0 640 1, 64 640 1, 64 576 1, 128 576 1, 128 640 1, 192 640 1, 192 576 1
192 -64 0 192 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 144 576 1, 96 576 1, -17 704 1, 68 704 1
576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 243 576 1, 333 704 1, 419 704 1, 299 576 1
576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 167 576 1, 258 704 1, 339 704 1, 430 576 1, 374 576 1, 299 657 1, 298 657 1, 223 576 1
448 -64 0 384 576;121 192 1, 136 142 0, 158 114 1, 198 64 0, 269 64 1, 316 64 0, 384 72 1, 384 10 1, 311 0 0, 260 0 1, 173 0 0, 119 46 1, 81 78 0, 62 132 1, 55 151 0, 46 192 1, -21 192 1, -2 256 1, 40 256 1, 39 280 1, 39 282 0, 39 288 1, 40 302 0, 41 320 1, -21 320 1, -2 384 1, 48 384 1, 63 444 0, 81 474 1, 140 576 0, 273 576 1, 320 576 0, 384 573 1, 384 502 1, 321 512 0, 273 512 1, 207 512 0, 168 469 1, 145 444 0, 133 413 1, 128 401 0, 123 384 1, 336 384 1, 316 320 1, 115 320 1, 113 296 0, 113 281 1, 114 256 1, 286 256 1, 267 192 1
576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 354 576 1, 299 576 1, 178 704 1, 264 704 1
576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 225 576 1, 328 704 1, 425 704 1, 288 576 1
576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 139 576 1, 242 704 1, 334 704 1, 437 576 1, 374 576 1, 288 657 1, 288 657 1, 202 576 1
576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 351 576 1, 288 576 1, 151 704 1, 248 704 1
192 64 0 128 384;64 0 1, 64 384 1, 128 384 1, 128 0 1
256 -64 512 320 576;-3 512 1, 87 576 1, 169 576 1, 259 512 1, 204 512 1, 128 552 1, 128 552 1, 52 512 1
256 0 448 256 640;3 502 1, 6 531 0, 15 548 1, 32 576 0, 73 576 1, 100 576 0, 123 576 1, 146 576 1, 167 576 0, 178 576 1, 203 576 0, 207 590 1, 253 590 1, 250 559 0, 241 542 1, 224 512 0, 183 512 1, 156 512 0, 133 512 1, 110 512 1, 90 512 0, 78 512 1, 53 512 0, 49 502 1
256 0 448 256 512;0 448 1, 0 512 1, 256 512 1, 256 448 1
256 0 512 256 640;3 602 1, 49 602 1, 57 588 0, 77 582 1, 97 576 0, 128 576 1, 163 576 0, 184 583 1, 200 589 0, 207 602 1, 253 602 1, 247 564 0, 220 542 1, 184 512 0, 128 512 1, 69 512 0, 33 544 1, 9 566 0
256 64 512 128 576;64 512 1, 64 576 1, 128 576 1, 128 512 1
256 64 512 192 640;128 640 1, 155 640 0, 173 621 1, 192 603 0, 192 576 1, 192 549 0, 173 531 1, 155 512 0, 127 512 1, 104 512 0, 87 527 1, 64 547 0, 64 576 1, 64 603 0, 83 621 1, 101 640 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0, 128 576 1, 128 576 0
256 0 -192 192 0;107 0 1, 143 0 1, 120 -41 1, 147 -42 0, 166 -59 1, 192 -82 0, 192 -116 1, 192 -148 0, 170 -170 1, 149 -192 0, 116 -192 1, 91 -192 0, 63 -154 1, 63 -124 1, 79 -128 0, 96 -128 1, 128 -128 0, 128 -101 1, 128 -67 0, 71 -66 1
256 -64 448 320 576;-19 456 1, 71 576 1, 143 576 1, 23 456 1, 113 456 1, 203 576 1, 275 576 1, 155 456 1
256 64 -128 192 0;123 0 1, 163 0 1, 128 -19 0, 128 -42 1, 128 -64 0, 164 -64 1, 180 -64 0, 192 -98 1, 192 -128 1, 169 -128 0, 140 -128 1, 64 -128 0, 64 -73 1, 64 -31 0
256 -64 512 320 576;259 576 1, 169 512 1, 87 512 1, -3 576 1, 52 576 1, 128 536 1, 128 536 1, 204 576 1
448 -64 0 384 576;121 192 1, 136 142 0, 158 114 1, 198 64 0, 269 64 1, 316 64 0, 384 72 1, 384 10 1, 311 0 0, 260 0 1, 173 0 0, 119 46 1, 81 78 0, 62 132 1, 55 151 0, 46 192 1, -21 192 1, -2 256 1, 40 256 1, 39 280 1, 39 282 0, 39 288 1, 40 302 0, 41 320 1, -21 320 1, -2 384 1, 48 384 1, 63 444 0, 81 474 1, 140 576 0, 273 576 1, 320 576 0, 384 573 1, 384 502 1, 321 512 0, 273 512 1, 207 512 0, 168 469 1, 145 444 0, 133 413 1, 128 401 0, 123 384 1, 336 384 1, 316 320 1, 115 320 1, 113 296 0, 113 281 1, 114 256 1, 286 256 1, 267 192 1
192 0 0 0 0;
192 64 -128 128 576;64 -128 1, 64 192 1, 128 192 1, 128 -128 1, 64 320 1, 64 576 1, 128 576 1, 128 320 1
256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
448 64 512 384 576;64 512 1, 64 576 1, 384 576 1, 384 512 1
256 0 192 256 576;28 192 1, 28 256 1, 55 300 0, 101 338 1, 129 361 1, 192 412 0, 192 458 1, 192 512 0, 127 512 1, 89 512 0, 36 488 1, 36 532 1, 89 576 0, 138 576 1, 191 576 0, 224 548 1, 256 521 0, 256 477 1, 256 421 0, 179 359 1, 157 341 1, 102 296 0, 92 256 1, 238 256 1, 238 192 1
256 0 192 256 576;32 507 1, 32 549 1, 68 576 0, 103 576 1, 192 576 0, 192 492 1, 192 454 0, 177 429 1, 168 414 0, 151 402 1, 212 388 0, 236 360 1, 256 336 0, 256 302 1, 256 251 0, 220 222 1, 184 192 0, 121 192 1, 79 192 0, 28 225 1, 28 270 1, 84 256 0, 117 256 1, 192 256 0, 192 314 1, 192 381 0, 78 381 1, 59 381 1, 59 416 1, 75 416 1, 128 416 0, 128 470 1, 128 512 0, 86 512 1, 62 512 0
192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
256 0 192 192 576;128 192 1, 128 477 1, 54 458 1, 54 501 1, 192 534 1, 192 192 1
640 0 -64 640 576;128 192 1, 128 494 1, 54 475 1, 54 518 1, 192 551 1, 192 192 1, 512 -27 1, 512 64 1, 361 64 1, 361 126 1, 511 320 1, 576 320 1, 576 128 1, 622 128 1, 622 64 1, 576 64 1, 576 -27 1, 409 128 1, 512 128 1, 512 249 1, 82 -41 1, 495 556 1, 554 556 1, 134 -41 1
640 0 -64 640 576;401 0 1, 401 64 1, 428 95 0, 479 125 1, 509 143 1, 576 181 0, 576 215 1, 576 256 0, 507 256 1, 467 256 0, 410 248 1, 410 291 1, 466 320 0, 516 320 1, 572 320 0, 606 298 1, 640 276 0, 640 241 1, 640 194 0, 559 146 1, 535 132 1, 476 96 0, 466 64 1, 612 64 1, 612 0 1, 63 -14 1, 480 539 1, 531 539 1, 114 -14 1, 128 192 1, 128 477 1, 54 458 1, 54 501 1, 192 534 1, 192 192 1
640 0 -64 640 576;56 494 1, 56 536 1, 101 576 0, 145 576 1, 256 576 0, 256 486 1, 256 444 0, 227 418 1, 209 402 0, 175 389 1, 222 376 0, 241 349 1, 256 327 0, 256 295 1, 256 247 0, 224 220 1, 192 192 0, 135 192 1, 97 192 0, 52 215 1, 52 259 1, 100 256 0, 128 256 1, 192 256 0, 192 308 1, 192 368 0, 102 368 1, 83 368 1, 83 403 1, 99 403 1, 192 403 0, 192 465 1, 192 512 0, 133 512 1, 99 512 0, 512 -27 1, 512 64 1, 359 64 1, 359 126 1, 510 320 1, 576 320 1, 576 128 1, 623 128 1, 623 64 1, 576 64 1, 576 -27 1, 408 128 1, 512 128 1, 512 260 1, 117 -41 1, 528 556 1, 589 556 1, 167 -41 1
576 0 0 512 576;64 0 1, 64 256 1, 0 256 1, 0 320 1, 64 320 1, 64 576 1, 229 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 365 0 0, 231 0 1, 128 64 1, 225 64 1, 448 64 0, 448 292 1, 448 426 0, 361 481 1, 336 497 0, 300 504 1, 258 512 0, 188 512 1, 128 512 1, 128 320 1, 256 320 1, 256 256 1, 128 256 1
448 0 0 448 384;44 58 1, 185 199 1, 44 340 1, 84 379 1, 224 238 1, 365 379 1, 404 340 1, 264 199 1, 404 58 1, 365 19 1, 224 160 1, 84 19 1
512 -64 0 512 704;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1, 185 576 1, 261 704 1, 346 704 1, 232 576 1
512 64 0 512 576;64 0 1, 64 576 1, 128 576 1, 128 448 1, 267 448 1, 365 448 0, 408 438 1, 451 429 0, 478 401 1, 512 367 0, 512 308 1, 512 128 0, 244 128 1, 128 128 1, 128 0 1, 128 192 1, 240 192 1, 448 192 0, 448 302 1, 448 355 0, 394 371 1, 348 384 0, 242 384 1, 128 384 1
448 64 0 384 704;64 554 1, 64 615 1, 139 615 0, 200 586 1, 258 650 1, 287 617 1, 238 559 1, 278 523 0, 299 494 1, 384 380 0, 384 219 1, 384 116 0, 342 58 1, 299 0 0, 226 0 1, 152 0 0, 108 53 1, 64 105 0, 64 194 1, 64 283 0, 110 333 1, 155 384 0, 234 384 1, 253 384 0, 276 379 1, 247 449 0, 194 497 1, 138 416 1, 109 459 1, 157 528 1, 119 554 0, 223 320 1, 178 320 0, 153 287 1, 128 253 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 192 1, 320 320 0
384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 64 -128 384 576;128 -128 1, 64 -128 1, 64 576 1, 128 576 1, 128 312 1, 148 344 0, 171 361 1, 203 384 0, 247 384 1, 308 384 0, 346 334 1, 384 285 0, 384 202 1, 384 106 0, 335 53 1, 286 0 0, 197 0 1, 164 0 0, 128 0 1, 128 249 1, 128 53 1, 182 64 0, 209 64 1, 320 64 0, 320 199 1, 320 256 0, 298 288 1, 276 320 0, 239 320 1, 190 320 0
512 -64 0 512 640;-1 0 1, 215 576 1, 297 576 1, 510 0 1, 425 0 1, 366 128 1, 130 128 1, 72 0 1, 154 192 1, 343 192 1, 249 458 1, 128 576 1, 128 640 1, 384 640 1, 384 576 1
448 0 0 448 512;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
512 0 0 512 768;8 0 1, 219 576 1, 297 576 1, 504 0 1, 419 0 1, 362 128 1, 139 128 1, 81 0 1, 161 192 1, 340 192 1, 251 458 1, 133 743 1, 179 743 1, 187 722 0, 207 713 1, 226 704 0, 258 704 1, 293 704 0, 313 715 1, 329 724 0, 336 743 1, 383 743 1, 377 700 0, 350 674 1, 314 640 0, 258 640 1, 199 640 0, 163 677 1, 139 702 0
448 0 0 448 640;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 67 602 1, 113 602 1, 121 588 0, 141 582 1, 161 576 0, 192 576 1, 227 576 0, 248 583 1, 264 589 0, 271 602 1, 317 602 1, 311 564 0, 284 542 1, 248 512 0, 192 512 1, 133 512 0, 97 544 1, 73 566 0
512 0 -128 512 576;7 0 1, 218 576 1, 296 576 1, 503 0 1, 419 0 1, 361 128 1, 138 128 1, 80 0 1, 161 192 1, 339 192 1, 250 458 1, 419 0 1, 459 0 1, 448 -19 0, 448 -42 1, 448 -64 0, 470 -64 1, 481 -64 0, 488 -98 1, 488 -128 1, 469 -128 0, 446 -128 1, 384 -128 0, 384 -73 1, 384 -31 0
448 0 -128 448 384;329 49 1, 239 0 0, 155 0 1, 86 0 0, 43 28 1, 0 57 0, 0 101 1, 0 227 0, 299 227 1, 320 227 1, 320 274 1, 320 320 0, 224 320 1, 149 320 0, 64 307 1, 64 364 1, 151 384 0, 228 384 1, 309 384 0, 347 358 1, 384 331 0, 384 274 1, 384 99 1, 384 64 0, 423 64 1, 428 64 0, 437 42 1, 443 3 1, 417 0 0, 392 0 1, 368 0 0, 352 11 1, 337 23 0, 320 87 1, 320 186 1, 283 187 1, 248 188 0, 206 184 1, 64 173 0, 64 116 1, 64 64 0, 168 64 1, 240 64 0, 315 0 1, 355 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 356 -64 1, 372 -64 0, 384 -98 1, 384 -128 1, 361 -128 0, 332 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 270 576 1, 360 704 1, 446 704 1, 326 576 1
384 0 0 384 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 194 576 1, 285 704 1, 366 704 1, 457 576 1, 401 576 1, 326 657 1, 325 657 1, 250 576 1
384 0 0 384 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 74 512 1, 164 576 1, 246 576 1, 332 512 1, 281 512 1, 205 552 1, 204 552 1, 129 512 1
576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 320 640 1, 320 704 1, 384 704 1, 384 640 1
384 64 0 320 576;320 11 1, 265 0 0, 216 0 1, 148 0 0, 106 53 1, 64 107 0, 64 192 1, 64 282 0, 107 333 1, 150 384 0, 228 384 1, 267 384 0, 320 380 1, 320 322 1, 268 320 0, 237 320 1, 128 320 0, 128 191 1, 128 130 0, 156 97 1, 183 64 0, 232 64 1, 270 64 0, 320 72 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
576 64 0 512 704;512 30 1, 429 0 0, 334 0 1, 202 0 0, 133 73 1, 64 147 0, 64 287 1, 64 427 0, 134 502 1, 205 576 0, 338 576 1, 413 576 0, 512 566 1, 512 489 1, 394 512 0, 326 512 1, 230 512 0, 179 454 1, 128 396 0, 128 287 1, 128 180 0, 182 122 1, 237 64 0, 335 64 1, 417 64 0, 512 100 1, 457 704 1, 366 576 1, 285 576 1, 194 704 1, 250 704 1, 325 623 1, 326 623 1, 401 704 1
384 0 0 448 576;320 11 1, 251 0 0, 190 0 1, 104 0 0, 52 53 1, 0 107 0, 0 192 1, 0 282 0, 54 333 1, 108 384 0, 205 384 1, 254 384 0, 320 380 1, 320 322 1, 251 320 0, 209 320 1, 64 320 0, 64 191 1, 64 130 0, 101 97 1, 137 64 0, 203 64 1, 253 64 0, 320 72 1, 387 576 1, 297 512 1, 215 512 1, 125 576 1, 180 576 1, 256 536 1, 256 536 1, 332 576 1
576 64 0 512 704;64 0 1, 64 576 1, 227 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 364 0 0, 228 0 1, 128 64 1, 223 64 1, 448 64 0, 448 292 1, 448 426 0, 360 481 1, 335 497 0, 299 504 1, 257 512 0, 186 512 1, 128 512 1, 374 704 1, 284 576 1, 202 576 1, 115 704 1, 167 704 1, 243 623 1, 244 623 1, 319 704 1
448 64 0 448 576;320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 576 1, 384 576 1, 384 0 1, 320 0 1, 384 400 1, 384 422 1, 409 430 0, 409 493 1, 409 499 1, 384 499 1, 384 576 1, 448 576 1, 448 510 1, 448 408 0
576 0 0 512 576;64 0 1, 64 256 1, 0 256 1, 0 320 1, 64 320 1, 64 576 1, 229 576 1, 512 576 0, 512 301 1, 512 158 0, 438 79 1, 365 0 0, 231 0 1, 128 64 1, 225 64 1, 448 64 0, 448 292 1, 448 426 0, 361 481 1, 336 497 0, 300 504 1, 258 512 0, 188 512 1, 128 512 1, 128 320 1, 256 320 1, 256 256 1, 128 256 1
448 64 0 448 576;320 448 1, 200 448 1, 200 512 1, 320 512 1, 320 576 1, 384 576 1, 384 512 1, 440 512 1, 440 448 1, 384 448 1, 384 0 1, 320 0 1, 320 72 1, 300 40 0, 277 23 1, 245 0 0, 201 0 1, 140 0 0, 102 50 1, 64 100 0, 64 182 1, 64 278 0, 113 331 1, 162 384 0, 251 384 1, 285 384 0, 320 384 1, 320 135 1, 320 331 1, 265 320 0, 239 320 1, 128 320 0, 128 185 1, 128 129 0, 150 96 1, 172 64 0, 209 64 1, 258 64 0
512 64 0 512 640;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 128 576 1, 128 640 1, 384 640 1, 384 576 1
448 64 0 448 512;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
512 64 0 512 768;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 129 743 1, 181 743 1, 190 722 0, 212 713 1, 234 704 0, 269 704 1, 308 704 0, 331 715 1, 349 724 0, 357 743 1, 408 743 1, 401 700 0, 371 674 1, 331 640 0, 268 640 1, 203 640 0, 163 677 1, 136 702 0
448 64 0 448 640;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 93 579 1, 139 579 1, 147 543 0, 167 527 1, 186 512 0, 218 512 1, 253 512 0, 273 531 1, 289 546 0, 296 579 1, 342 579 1, 336 524 0, 309 491 1, 273 448 0, 217 448 1, 159 448 0, 123 495 1, 99 526 0
512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 256 640 1, 256 704 1, 320 704 1, 320 640 1
448 64 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 128 512 1, 128 576 1, 192 576 1, 192 512 1
512 64 -128 512 576;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 410 0 1, 448 0 1, 384 -19 0, 384 -42 1, 384 -64 0, 420 -64 1, 436 -64 0, 448 -98 1, 448 -128 1, 425 -128 0, 396 -128 1, 320 -128 0, 320 -73 1, 320 -31 0
448 64 -128 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 251 0 1, 291 0 1, 256 -19 0, 256 -42 1, 256 -64 0, 292 -64 1, 308 -64 0, 320 -98 1, 320 -128 1, 297 -128 0, 268 -128 1, 192 -128 0, 192 -73 1, 192 -31 0
512 64 0 512 704;64 0 1, 64 576 1, 448 576 1, 448 512 1, 128 512 1, 128 320 1, 448 320 1, 448 256 1, 128 256 1, 128 64 1, 512 64 1, 512 0 1, 413 704 1, 312 576 1, 221 576 1, 122 704 1, 182 704 1, 266 623 1, 267 623 1, 351 704 1
448 0 0 448 576;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
576 64 0 512 704;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 222 576 1, 312 704 1, 391 704 1, 454 576 1, 415 576 1, 354 657 1, 353 657 1, 277 576 1
448 64 -192 384 576;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 119 512 1, 208 576 1, 288 576 1, 370 512 1, 322 512 1, 248 552 1, 248 552 1, 174 512 1
576 64 0 512 768;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 228 743 1, 274 743 1, 281 722 0, 300 713 1, 317 704 0, 345 704 1, 378 704 0, 396 715 1, 411 724 0, 417 743 1, 449 743 1, 444 700 0, 419 674 1, 388 640 0, 339 640 1, 286 640 0, 255 677 1, 233 702 0
448 64 -192 384 640;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 131 602 1, 177 602 1, 185 588 0, 205 582 1, 225 576 0, 256 576 1, 291 576 0, 312 583 1, 328 589 0, 335 602 1, 381 602 1, 375 564 0, 348 542 1, 312 512 0, 256 512 1, 197 512 0, 161 544 1, 137 566 0
576 64 0 512 704;512 256 1, 512 14 1, 418 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 320 640 1, 320 704 1, 384 704 1, 384 640 1
448 64 -192 384 576;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 192 512 1, 192 576 1, 256 576 1, 256 512 1
576 64 -192 512 576;512 256 1, 512 14 1, 417 0 0, 330 0 1, 64 0 0, 64 286 1, 64 426 0, 133 501 1, 202 576 0, 332 576 1, 416 576 0, 512 564 1, 512 485 1, 398 512 0, 323 512 1, 128 512 0, 128 289 1, 128 180 0, 183 122 1, 238 64 0, 340 64 1, 382 64 0, 448 57 1, 448 192 1, 384 192 1, 384 256 1, 291 -158 1, 291 -126 1, 299 -128 0, 305 -128 1, 320 -128 0, 320 -104 1, 320 -77 0, 309 -71 1, 309 -42 1, 343 -43 0, 360 -57 1, 384 -77 0, 384 -121 1, 384 -192 0, 325 -192 1, 309 -192 0
448 64 -192 384 704;320 153 1, 320 331 1, 265 320 0, 240 320 1, 128 320 0, 128 190 1, 128 132 0, 150 98 1, 172 64 0, 209 64 1, 258 64 0, 320 90 1, 300 50 0, 277 29 1, 245 0 0, 202 0 1, 140 0 0, 102 52 1, 64 103 0, 64 186 1, 64 280 0, 113 332 1, 162 384 0, 250 384 1, 285 384 0, 320 384 1, 384 384 1, 384 105 1, 384 22 0, 374 -18 1, 348 -128 0, 194 -128 1, 130 -128 0, 64 -135 1, 64 -71 1, 143 -64 0, 198 -64 1, 320 -64 0, 320 29 1, 256 682 1, 256 660 1, 231 652 0, 231 592 1, 231 586 1, 256 586 1, 256 512 1, 192 512 1, 192 576 1, 192 674 0
576 64 0 512 704;64 0 1, 64 576 1, 128 576 1, 128 320 1, 448 320 1, 448 576 1, 512 576 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1, 134 576 1, 240 704 1, 336 704 1, 441 576 1, 376 576 1, 288 657 1, 287 657 1, 199 576 1
448 64 0 384 768;64 0 1, 64 576 1, 128 576 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 88 640 1, 179 768 1, 272 768 1, 362 640 1, 312 640 1, 226 721 1, 225 721 1, 139 640 1
576 0 0 576 576;128 320 1, 448 320 1, 448 384 1, 128 384 1, 64 0 1, 64 384 1, 8 384 1, 8 448 1, 64 448 1, 64 576 1, 128 576 1, 128 448 1, 448 448 1, 448 576 1, 512 576 1, 512 448 1, 568 448 1, 568 384 1, 512 384 1, 512 0 1, 448 0 1, 448 256 1, 128 256 1, 128 0 1
448 0 0 384 576;64 0 1, 64 448 1, 8 448 1, 8 512 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 255 512 1, 255 448 1, 128 448 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 254 1, 320 293 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
192 -64 0 256 768;64 0 1, 64 576 1, 128 576 1, 128 0 1, -22 623 1, -20 655 0, -11 673 1, 5 704 0, 43 704 1, 68 704 0, 89 704 1, 110 704 1, 130 704 0, 141 704 1, 163 704 0, 167 710 1, 214 710 1, 212 682 0, 203 667 1, 187 640 0, 150 640 1, 125 640 0, 103 640 1, 82 640 1, 63 640 0, 51 640 1, 29 640 0, 25 623 1
192 -64 0 256 640;64 0 1, 64 384 1, 128 384 1, 128 0 1, -24 480 1, -21 518 0, -13 539 1, 4 576 0, 43 576 1, 69 576 0, 90 576 1, 112 576 1, 132 576 0, 143 576 1, 166 576 0, 170 590 1, 216 590 1, 213 559 0, 205 542 1, 188 512 0, 150 512 1, 124 512 0, 102 512 1, 80 512 1, 61 512 0, 49 512 1, 26 512 0, 22 480 1
192 0 0 256 640;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 576 1, 0 640 1, 256 640 1, 256 576 1
192 -64 0 192 512;64 0 1, 64 384 1, 128 384 1, 128 0 1, -64 448 1, -64 512 1, 192 512 1, 192 448 1
192 -64 0 256 768;64 0 1, 64 576 1, 128 576 1, 128 0 1, -22 743 1, 25 743 1, 32 722 0, 50 713 1, 68 704 0, 96 704 1, 128 704 0, 146 715 1, 161 724 0, 167 743 1, 214 743 1, 208 700 0, 182 674 1, 149 640 0, 96 640 1, 40 640 0, 7 677 1, -16 702 0
192 -64 0 256 640;64 0 1, 64 384 1, 128 384 1, 128 0 1, -24 578 1, 22 578 1, 29 542 0, 48 527 1, 67 512 0, 96 512 1, 129 512 0, 148 531 1, 163 546 0, 170 578 1, 216 578 1, 210 524 0, 184 491 1, 150 448 0, 96 448 1, 39 448 0, 5 495 1, -18 526 0
192 64 -128 192 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 94 0 1, 126 0 1, 128 -19 0, 128 -42 1, 128 -64 0, 143 -64 1, 150 -64 0, 155 -98 1, 155 -128 1, 139 -128 0, 118 -128 1, 64 -128 0, 64 -73 1, 64 -31 0
192 0 -128 128 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 59 0 1, 99 0 1, 64 -19 0, 64 -42 1, 64 -64 0, 100 -64 1, 116 -64 0, 128 -98 1, 128 -128 1, 105 -128 0, 76 -128 1, 0 -128 0, 0 -73 1, 0 -31 0
192 64 0 128 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 64 640 1, 64 704 1, 128 704 1, 128 640 1
576 64 -128 512 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 -87 1, 192 -19 1, 267 -64 0, 333 -64 1, 408 -64 0, 430 -29 1, 448 0 0, 448 71 1, 448 576 1, 512 576 1, 512 73 1, 512 -128 0, 317 -128 1, 252 -128 0
320 64 -192 320 576;64 0 1, 64 384 1, 128 384 1, 128 0 1, 64 512 1, 64 576 1, 128 576 1, 128 512 1, 128 -145 1, 128 -87 1, 164 -64 0, 195 -64 1, 238 -64 0, 248 -47 1, 256 -32 0, 256 0 1, 256 384 1, 320 384 1, 320 0 1, 320 -128 0, 194 -128 1, 159 -128 0, 256 512 1, 256 576 1, 320 576 1, 320 512 1
384 0 -128 448 704;0 -87 1, 0 -19 1, 75 -64 0, 141 -64 1, 216 -64 0, 238 -29 1, 256 0 0, 256 71 1, 256 576 1, 320 576 1, 320 73 1, 320 -128 0, 125 -128 1, 60 -128 0, 137 576 1, 244 704 1, 314 704 1, 403 576 1, 347 576 1, 281 657 1, 280 657 1, 203 576 1
192 -64 -192 256 576;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0, -55 512 1, 52 576 1, 126 576 1, 216 512 1, 160 512 1, 91 552 1, 90 552 1, 11 512 1
512 64 -192 512 576;64 0 1, 64 576 1, 128 576 1, 128 293 1, 359 576 1, 438 576 1, 214 301 1, 476 0 1, 377 0 1, 128 292 1, 128 0 1, 165 -158 1, 165 -126 1, 190 -128 0, 208 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 184 -71 1, 184 -42 1, 246 -43 0, 277 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 222 -192 1, 195 -192 0
384 64 -192 384 576;64 0 1, 64 576 1, 128 576 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
384 64 0 384 384;64 0 1, 64 384 1, 128 384 1, 128 198 1, 265 384 1, 335 384 1, 205 203 1, 374 0 1, 284 0 1, 128 197 1, 128 0 1
448 64 0 384 704;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 68 576 1, 143 704 1, 224 704 1, 113 576 1
192 0 0 256 704;64 0 1, 64 576 1, 128 576 1, 128 0 1, 40 640 1, 131 704 1, 216 704 1, 96 640 1
448 64 -192 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 154 -158 1, 154 -126 1, 164 -128 0, 172 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 171 -71 1, 171 -42 1, 210 -43 0, 229 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 191 -192 1, 174 -192 0
192 0 -192 128 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 0 -158 1, 0 -126 1, 18 -128 0, 30 -128 1, 64 -128 0, 64 -104 1, 64 -77 0, 18 -71 1, 18 -42 1, 68 -43 0, 93 -57 1, 128 -77 0, 128 -121 1, 128 -192 0, 47 -192 1, 25 -192 0
448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 256 400 1, 256 423 1, 281 431 0, 281 493 1, 281 500 1, 256 500 1, 256 576 1, 320 576 1, 320 510 1, 320 408 0
256 64 0 256 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 410 1, 192 432 1, 217 440 0, 217 498 1, 217 504 1, 192 504 1, 192 576 1, 256 576 1, 256 514 1, 256 418 0
448 64 0 384 576;64 0 1, 64 576 1, 128 576 1, 128 64 1, 384 64 1, 384 0 1, 320 256 1, 320 320 1, 384 320 1, 384 256 1
256 64 0 256 576;64 0 1, 64 576 1, 128 576 1, 128 0 1, 192 256 1, 192 320 1, 256 320 1, 256 256 1
448 0 0 384 576;64 0 1, 64 271 1, 0 240 1, 0 305 1, 64 337 1, 64 576 1, 128 576 1, 128 381 1, 256 433 1, 256 367 1, 128 316 1, 128 64 1, 384 64 1, 384 0 1
192 0 0 192 576;64 0 1, 64 263 1, 0 237 1, 0 297 1, 64 324 1, 64 576 1, 128 576 1, 128 364 1, 192 388 1, 192 329 1, 128 303 1, 128 0 1
576 64 0 512 704;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 228 576 1, 326 704 1, 418 704 1, 288 576 1
448 64 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
576 64 -192 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 198 -158 1, 198 -126 1, 214 -128 0, 225 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 218 -71 1, 218 -42 1, 265 -43 0, 288 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 243 -192 1, 222 -192 0
448 64 -192 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
576 64 0 512 704;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 0 1, 437 0 1, 128 445 1, 128 0 1, 430 704 1, 332 576 1, 244 576 1, 146 704 1, 206 704 1, 288 623 1, 288 623 1, 370 704 1
448 0 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
448 0 0 384 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 0 1, 320 0 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1, 0 399 1, 0 422 1, 25 430 0, 25 493 1, 25 499 1, 0 499 1, 0 576 1, 64 576 1, 64 509 1, 64 407 0
576 64 -192 512 576;64 0 1, 64 576 1, 138 576 1, 448 131 1, 448 576 1, 512 576 1, 512 -35 1, 512 -128 0, 382 -128 1, 352 -128 0, 320 -150 1, 320 -92 1, 349 -64 0, 382 -64 1, 448 -64 0, 448 -21 1, 448 -15 1, 128 445 1, 128 0 1
448 64 -192 384 384;64 0 1, 64 384 1, 128 384 1, 128 312 1, 157 344 0, 185 360 1, 226 384 0, 275 384 1, 384 384 0, 384 276 1, 384 -35 1, 384 -128 0, 254 -128 1, 224 -128 0, 192 -150 1, 192 -92 1, 223 -64 0, 250 -64 1, 320 -64 0, 320 -21 1, 320 253 1, 320 292 0, 308 306 1, 296 320 0, 264 320 1, 194 320 0, 128 249 1, 128 0 1
576 64 0 576 640;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 192 576 1, 192 640 1, 448 640 1, 448 576 1
448 64 0 384 512;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 64 448 1, 64 512 1, 320 512 1, 320 448 1
576 64 0 576 768;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 174 743 1, 220 743 1, 228 722 0, 248 713 1, 268 704 0, 299 704 1, 334 704 0, 355 715 1, 371 724 0, 378 743 1, 424 743 1, 418 700 0, 391 674 1, 355 640 0, 299 640 1, 240 640 0, 204 677 1, 180 702 0
448 64 0 384 640;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 89 579 1, 135 579 1, 143 543 0, 163 527 1, 182 512 0, 214 512 1, 249 512 0, 269 531 1, 285 546 0, 292 579 1, 338 579 1, 332 524 0, 305 491 1, 269 448 0, 213 448 1, 155 448 0, 119 495 1, 95 526 0
576 64 0 576 704;320 576 1, 436 576 0, 506 498 1, 576 419 0, 576 289 1, 576 156 0, 506 78 1, 436 0 0, 316 0 1, 214 0 0, 147 64 1, 64 145 0, 64 288 1, 64 420 0, 134 498 1, 204 576 0, 320 512 1, 229 512 0, 179 453 1, 128 394 0, 128 288 1, 128 183 0, 179 124 1, 229 64 0, 318 64 1, 401 64 0, 450 112 1, 512 171 0, 512 289 1, 512 394 0, 461 453 1, 410 512 0, 212 612 1, 303 704 1, 374 704 1, 254 612 1, 344 612 1, 434 704 1, 506 704 1, 386 612 1
448 64 0 448 576;224 384 1, 298 384 0, 341 333 1, 384 281 0, 384 193 1, 384 102 0, 341 51 1, 298 0 0, 222 0 1, 156 0 0, 116 42 1, 64 95 0, 64 192 1, 64 281 0, 107 333 1, 150 384 0, 224 320 1, 128 320 0, 128 192 1, 128 64 0, 224 64 1, 320 64 0, 320 193 1, 320 320 0, 109 456 1, 199 576 1, 271 576 1, 151 456 1, 241 456 1, 331 576 1, 403 576 1, 283 456 1
576 64 0 576 704;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 184 576 1, 274 704 1, 359 704 1, 239 576 1
256 64 0 320 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 104 512 1, 195 576 1, 280 576 1, 160 512 1
576 64 -192 576 576;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 184 -158 1, 184 -126 1, 204 -128 0, 218 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 202 -71 1, 202 -42 1, 256 -43 0, 283 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 234 -192 1, 210 -192 0
256 64 -192 256 448;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
576 64 0 576 704;64 0 1, 64 576 1, 281 576 1, 448 576 0, 448 439 1, 448 372 0, 408 329 1, 384 303 0, 340 283 1, 525 0 1, 428 0 1, 271 256 1, 128 256 1, 128 0 1, 128 320 1, 216 320 1, 303 320 0, 343 346 1, 384 373 0, 384 429 1, 384 474 0, 351 493 1, 318 512 0, 241 512 1, 128 512 1, 356 704 1, 265 576 1, 184 576 1, 100 704 1, 149 704 1, 224 623 1, 225 623 1, 300 704 1
256 -64 0 320 576;64 0 1, 64 384 1, 128 384 1, 128 312 1, 145 345 0, 165 361 1, 194 384 0, 233 384 1, 241 384 0, 256 391 1, 256 326 1, 235 320 0, 222 320 1, 178 320 0, 128 253 1, 128 0 1, 259 576 1, 169 512 1, 87 512 1, -3 576 1, 52 576 1, 128 536 1, 128 536 1, 204 576 1
512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 214 576 1, 304 704 1, 389 704 1, 269 576 1
384 64 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 168 512 1, 259 576 1, 344 576 1, 224 512 1
512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 139 576 1, 229 704 1, 310 704 1, 400 576 1, 344 576 1, 270 657 1, 269 657 1, 194 576 1
384 64 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 94 512 1, 181 576 1, 260 576 1, 348 512 1, 293 512 1, 221 552 1, 220 552 1, 147 512 1
512 64 -192 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 157 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 243 0 1, 279 0 1, 257 -41 1, 280 -42 0, 297 -59 1, 320 -82 0, 320 -116 1, 320 -148 0, 300 -170 1, 279 -192 0, 250 -192 1, 227 -192 0, 200 -154 1, 200 -124 1, 213 -128 0, 228 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 208 -66 1
384 64 -192 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 171 0 1, 207 0 1, 184 -41 1, 211 -42 0, 230 -59 1, 256 -82 0, 256 -116 1, 256 -148 0, 234 -170 1, 213 -192 0, 180 -192 1, 155 -192 0, 127 -154 1, 127 -124 1, 143 -128 0, 160 -128 1, 192 -128 0, 192 -101 1, 192 -67 0, 135 -66 1
512 64 0 512 704;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 156 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 400 704 1, 310 576 1, 229 576 1, 139 704 1, 194 704 1, 269 623 1, 270 623 1, 344 704 1
384 0 0 384 576;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
448 0 -192 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 212 0 1, 242 0 1, 223 -41 1, 259 -42 0, 285 -59 1, 320 -82 0, 320 -115 1, 320 -148 0, 295 -170 1, 270 -192 0, 234 -192 1, 205 -192 0, 173 -154 1, 173 -124 1, 193 -128 0, 214 -128 1, 256 -128 0, 256 -101 1, 256 -67 0, 181 -66 1
192 0 -192 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 112 0 1, 145 0 1, 124 -41 1, 149 -42 0, 167 -59 1, 192 -82 0, 192 -115 1, 192 -148 0, 172 -170 1, 152 -192 0, 123 -192 1, 100 -192 0, 74 -154 1, 74 -124 1, 87 -128 0, 101 -128 1, 128 -128 0, 128 -101 1, 128 -67 0, 81 -66 1
448 0 0 448 704;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 350 704 1, 258 576 1, 190 576 1, 98 704 1, 155 704 1, 224 623 1, 224 623 1, 293 704 1
320 0 -64 256 640;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 128 476 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 192 447 1, 192 472 1, 208 481 0, 208 549 1, 208 556 1, 192 556 1, 192 640 1, 256 640 1, 256 567 1, 256 456 0
448 0 0 448 576;192 0 1, 192 256 1, 64 256 1, 64 320 1, 192 320 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 320 1, 384 320 1, 384 256 1, 256 256 1, 256 0 1
192 0 -64 192 512;64 192 1, 0 192 1, 0 256 1, 64 256 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 256 1, 192 256 1, 192 192 1, 128 192 1, 128 114 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 102 1
576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 146 623 1, 149 655 0, 160 673 1, 179 704 0, 226 704 1, 256 704 0, 282 704 1, 308 704 1, 332 704 0, 345 704 1, 372 704 0, 377 710 1, 430 710 1, 427 682 0, 416 667 1, 397 640 0, 351 640 1, 321 640 0, 294 640 1, 268 640 1, 245 640 0, 231 640 1, 204 640 0, 199 623 1
448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 93 480 1, 96 519 0, 106 539 1, 125 576 0, 169 576 1, 198 576 0, 223 576 1, 248 576 1, 271 576 0, 283 576 1, 310 576 0, 314 590 1, 355 590 1, 352 559 0, 342 542 1, 324 512 0, 280 512 1, 250 512 0, 225 512 1, 200 512 1, 178 512 0, 165 512 1, 138 512 0, 134 480 1
576 64 0 512 640;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 192 576 1, 192 640 1, 384 640 1, 384 576 1
448 64 0 384 512;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 64 448 1, 64 512 1, 320 512 1, 320 448 1
576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 146 743 1, 199 743 1, 208 722 0, 231 713 1, 253 704 0, 288 704 1, 328 704 0, 351 715 1, 369 724 0, 377 743 1, 430 743 1, 423 700 0, 392 674 1, 352 640 0, 288 640 1, 221 640 0, 181 677 1, 153 702 0
448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 93 578 1, 134 578 1, 143 543 0, 166 527 1, 188 512 0, 224 512 1, 264 512 0, 287 531 1, 306 546 0, 314 578 1, 355 578 1, 349 524 0, 320 491 1, 283 448 0, 224 448 1, 162 448 0, 125 495 1, 100 526 0
576 64 0 512 768;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 288 768 1, 328 768 0, 356 749 1, 384 731 0, 384 704 1, 384 677 0, 356 659 1, 328 640 0, 287 640 1, 252 640 0, 226 655 1, 192 675 0, 192 704 1, 192 731 0, 220 749 1, 248 768 0, 288 704 1, 275 704 0, 265 704 1, 256 704 0, 256 704 1, 256 704 0, 265 704 1, 275 704 0, 288 704 1, 300 704 0, 309 704 1, 320 704 0, 320 704 1, 320 704 0, 310 704 1, 301 704 0
448 64 0 384 640;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 192 640 1, 219 640 0, 237 621 1, 256 603 0, 256 576 1, 256 549 0, 237 531 1, 219 512 0, 191 512 1, 168 512 0, 151 527 1, 128 547 0, 128 576 1, 128 603 0, 147 621 1, 165 640 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0, 192 576 1, 192 576 0
576 64 0 512 704;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 180 612 1, 283 704 1, 364 704 1, 228 612 1, 330 612 1, 432 704 1, 502 704 1, 377 612 1
448 64 0 448 576;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 109 456 1, 199 576 1, 271 576 1, 151 456 1, 241 456 1, 331 576 1, 403 576 1, 283 456 1
576 64 -128 512 576;64 576 1, 128 576 1, 128 213 1, 128 158 0, 139 132 1, 150 106 0, 180 88 1, 223 64 0, 295 64 1, 379 64 0, 414 97 1, 448 129 0, 448 210 1, 448 576 1, 512 576 1, 512 211 1, 512 139 0, 497 102 1, 482 64 0, 440 37 1, 385 0 0, 292 0 1, 174 0 0, 119 51 1, 64 102 0, 64 214 1, 308 0 1, 354 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 358 -64 1, 375 -64 0, 387 -98 1, 387 -128 1, 363 -128 0, 333 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
448 64 -128 384 384;320 0 1, 320 72 1, 291 40 0, 263 24 1, 222 0 0, 174 0 1, 64 0 0, 64 108 1, 64 384 1, 128 384 1, 128 131 1, 128 92 0, 140 78 1, 152 64 0, 184 64 1, 254 64 0, 320 135 1, 320 384 1, 384 384 1, 384 0 1, 315 0 1, 355 0 1, 320 -19 0, 320 -42 1, 320 -64 0, 356 -64 1, 372 -64 0, 384 -98 1, 384 -128 1, 361 -128 0, 332 -128 1, 256 -128 0, 256 -73 1, 256 -31 0
704 0 0 768 704;152 0 1, 9 576 1, 85 576 1, 199 121 1, 329 576 1, 405 576 1, 530 125 1, 651 576 1, 716 576 1, 560 0 1, 482 0 1, 358 444 1, 230 0 1, 236 576 1, 326 704 1, 408 704 1, 498 576 1, 443 576 1, 367 657 1, 366 657 1, 291 576 1
576 0 0 576 576;102 0 1, 4 384 1, 77 384 1, 150 95 1, 244 384 1, 318 384 1, 400 94 1, 486 384 1, 549 384 1, 435 0 1, 361 0 1, 275 297 1, 177 0 1, 149 512 1, 240 576 1, 321 576 1, 412 512 1, 356 512 1, 281 552 1, 280 552 1, 205 512 1
512 -64 0 512 704;192 0 1, 192 240 1, -7 576 1, 83 576 1, 232 309 1, 395 576 1, 468 576 1, 256 242 1, 256 0 1, 115 576 1, 203 704 1, 273 704 1, 363 576 1, 307 576 1, 236 657 1, 236 657 1, 171 576 1
384 0 -128 384 576;152 0 1, 7 384 1, 82 384 1, 193 90 1, 314 384 1, 380 384 1, 164 -128 1, 87 -128 1, 67 512 1, 157 576 1, 239 576 1, 329 512 1, 274 512 1, 198 552 1, 198 552 1, 122 512 1
448 64 0 448 704;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1, 190 576 1, 283 704 1, 370 704 1, 247 576 1
384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 168 512 1, 259 576 1, 344 576 1, 224 512 1
448 64 0 448 704;64 0 1, 64 64 1, 331 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 131 64 1, 448 64 1, 448 0 1, 192 640 1, 192 704 1, 256 704 1, 256 640 1
384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 128 512 1, 128 576 1, 192 576 1, 192 512 1
448 64 0 448 704;64 0 1, 64 64 1, 351 512 1, 64 512 1, 64 576 1, 448 576 1, 448 512 1, 142 64 1, 448 64 1, 448 0 1, 386 704 1, 293 576 1, 209 576 1, 117 704 1, 174 704 1, 251 623 1, 252 623 1, 329 704 1
384 0 0 384 576;0 0 1, 0 64 1, 291 320 1, 64 320 1, 64 384 1, 384 384 1, 384 320 1, 145 64 1, 384 64 1, 384 0 1, 323 576 1, 233 512 1, 151 512 1, 61 576 1, 116 576 1, 192 536 1, 192 536 1, 268 576 1
192 0 0 192 640;64 0 1, 64 352 1, 0 352 1, 0 407 1, 64 407 1, 64 456 1, 64 513 0, 91 544 1, 119 576 0, 169 576 1, 176 576 0, 192 600 1, 192 545 1, 181 512 0, 175 512 1, 128 512 0, 128 464 1, 128 0 1
512 64 -192 512 576;64 21 1, 64 102 1, 189 64 0, 311 64 1, 448 64 0, 448 152 1, 448 197 0, 410 218 1, 381 235 0, 315 253 1, 229 278 1, 64 324 0, 64 431 1, 64 576 0, 267 576 1, 355 576 0, 448 566 1, 448 491 1, 347 512 0, 255 512 1, 128 512 0, 128 431 1, 128 399 0, 154 379 1, 180 359 0, 247 340 1, 334 316 1, 432 288 0, 472 252 1, 512 216 0, 512 157 1, 512 84 0, 454 42 1, 396 0 0, 294 0 1, 193 0 0, 214 -158 1, 214 -126 1, 226 -128 0, 234 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 233 -71 1, 233 -42 1, 273 -43 0, 292 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 253 -192 1, 234 -192 0
384 64 -192 320 384;64 13 1, 64 77 1, 128 64 0, 183 64 1, 256 64 0, 256 116 1, 256 152 0, 204 168 1, 147 187 1, 64 214 0, 64 286 1, 64 384 0, 215 384 1, 258 384 0, 320 381 1, 320 323 1, 263 320 0, 206 320 1, 128 320 0, 128 276 1, 128 244 0, 174 230 1, 225 213 1, 320 182 0, 320 106 1, 320 57 0, 283 29 1, 245 0 0, 180 0 1, 129 0 0, 128 -158 1, 128 -126 1, 146 -128 0, 158 -128 1, 192 -128 0, 192 -104 1, 192 -77 0, 146 -71 1, 146 -42 1, 196 -43 0, 221 -57 1, 256 -77 0, 256 -121 1, 256 -192 0, 175 -192 1, 153 -192 0
448 0 -192 448 576;192 0 1, 192 512 1, 0 512 1, 0 576 1, 448 576 1, 448 512 1, 256 512 1, 256 0 1, 173 -158 1, 173 -126 1, 196 -128 0, 212 -128 1, 256 -128 0, 256 -104 1, 256 -77 0, 192 -71 1, 192 -42 1, 251 -43 0, 279 -57 1, 320 -77 0, 320 -121 1, 320 -192 0, 227 -192 1, 201 -192 0
192 0 -192 192 512;192 -2 1, 172 0 0, 154 0 1, 64 0 0, 64 103 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 458 1, 128 465 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 115 1, 128 84 0, 136 74 1, 144 64 0, 168 64 1, 182 64 0, 192 45 1, 64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
256 64 -192 192 0;64 -158 1, 64 -126 1, 82 -128 0, 94 -128 1, 128 -128 0, 128 -104 1, 128 -77 0, 82 -71 1, 82 -42 1, 132 -43 0, 157 -57 1, 192 -77 0, 192 -121 1, 192 -192 0, 111 -192 1, 89 -192 0
192 64 -128 128 384;64 -120 1, 64 -93 1, 87 -79 0, 87 -9 1, 87 0 1, 64 0 1, 64 64 1, 128 64 1, 128 10 1, 128 -102 0, 64 320 1, 64 384 1, 128 384 1, 128 320 1
192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
256 64 192 192 256;64 192 1, 64 256 1, 192 256 1, 192 192 1
448 0 192 448 256;38 192 1, 38 256 1, 390 256 1, 390 192 1
768 0 192 768 256;37 192 1, 37 256 1, 731 256 1, 731 192 1
192 0 0 0 0;
448 64 512 384 576;64 512 1, 64 576 1, 384 576 1, 384 512 1
448 64 0 448 384;311 256 1, 310 277 0, 303 287 1, 284 320 0, 219 320 1, 173 320 0, 147 305 1, 121 290 0, 115 256 1, 384 72 1, 384 13 1, 314 0 0, 256 0 1, 168 0 0, 116 53 1, 64 107 0, 64 197 1, 64 283 0, 110 333 1, 156 384 0, 234 384 1, 323 384 0, 360 325 1, 387 281 0, 386 212 1, 386 192 1, 114 192 1, 119 153 0, 129 132 1, 162 64 0, 260 64 1, 316 64 0
448 64 192 384 256;64 192 1, 64 256 1, 384 256 1, 384 192 1
128 -192 -64 320 576;-165 -14 1, 243 569 1, 293 569 1, -114 -14 1
192 64 192 128 256;64 192 1, 64 256 1, 128 256 1, 128 192 1
384 0 0 320 640;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 468 1, 64 640 0, 194 640 1, 221 640 0, 256 613 1, 256 557 1, 219 576 0, 193 576 1, 157 576 0, 142 555 1, 128 534 0, 128 482 1, 128 384 1, 320 384 1, 320 0 1, 256 0 1, 256 320 1, 128 320 1, 128 0 1, 256 512 1, 256 576 1, 320 576 1, 320 512 1
384 0 0 320 576;64 0 1, 64 320 1, 0 320 1, 0 384 1, 64 384 1, 64 435 1, 64 576 0, 175 576 1, 256 576 1, 320 576 1, 320 0 1, 256 0 1, 256 518 1, 240 516 1, 206 512 0, 183 512 1, 148 512 0, 137 493 1, 128 477 0, 128 443 1, 128 384 1, 192 384 1, 192 320 1, 128 320 1, 128 0 1
256 -64 192 256 576;128 229 1, 128 320 1, -25 320 1, -25 382 1, 126 576 1, 192 576 1, 192 384 1, 238 384 1, 238 320 1, 192 320 1, 192 229 1, 24 384 1, 128 384 1, 128 516 1
192 -64 -192 128 384;-64 -145 1, -64 -87 1, -28 -64 0, 3 -64 1, 46 -64 0, 56 -47 1, 64 -32 0, 64 0 1, 64 384 1, 128 384 1, 128 0 1, 128 -128 0, 2 -128 1, -33 -128 0
192 0 0 0 0;

BIN
vendor/github.com/golang/freetype/testdata/luxisr.ttf generated vendored Normal file

Binary file not shown.

22503
vendor/github.com/golang/freetype/testdata/luxisr.ttx generated vendored Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,34 @@
#!/usr/bin/env bash
#
# This script creates the optional x-*-hinting.txt files from fonts that are
# not checked in for copyright or file size reasons.
#
# Run it from this directory (testdata).
#
# It has only been tested on an Ubuntu 14.04 system.
set -e
: ${FONTDIR:=/usr/share/fonts/truetype}
ln -sf $FONTDIR/droid/DroidSansJapanese.ttf x-droid-sans-japanese.ttf
ln -sf $FONTDIR/msttcorefonts/Arial_Bold.ttf x-arial-bold.ttf
ln -sf $FONTDIR/msttcorefonts/Times_New_Roman.ttf x-times-new-roman.ttf
ln -sf $FONTDIR/ttf-dejavu/DejaVuSans-Oblique.ttf x-deja-vu-sans-oblique.ttf
${CC:=gcc} ../cmd/print-glyph-points/main.c $(pkg-config --cflags --libs freetype2) -o print-glyph-points
# Uncomment these lines to also recreate the luxisr-*-hinting.txt files.
# ./print-glyph-points 12 luxisr.ttf sans_hinting > luxisr-12pt-sans-hinting.txt
# ./print-glyph-points 12 luxisr.ttf with_hinting > luxisr-12pt-with-hinting.txt
./print-glyph-points 9 x-droid-sans-japanese.ttf sans_hinting > x-droid-sans-japanese-9pt-sans-hinting.txt
./print-glyph-points 9 x-droid-sans-japanese.ttf with_hinting > x-droid-sans-japanese-9pt-with-hinting.txt
./print-glyph-points 11 x-arial-bold.ttf sans_hinting > x-arial-bold-11pt-sans-hinting.txt
./print-glyph-points 11 x-arial-bold.ttf with_hinting > x-arial-bold-11pt-with-hinting.txt
./print-glyph-points 13 x-times-new-roman.ttf sans_hinting > x-times-new-roman-13pt-sans-hinting.txt
./print-glyph-points 13 x-times-new-roman.ttf with_hinting > x-times-new-roman-13pt-with-hinting.txt
./print-glyph-points 17 x-deja-vu-sans-oblique.ttf sans_hinting > x-deja-vu-sans-oblique-17pt-sans-hinting.txt
./print-glyph-points 17 x-deja-vu-sans-oblique.ttf with_hinting > x-deja-vu-sans-oblique-17pt-with-hinting.txt
rm print-glyph-points

507
vendor/github.com/golang/freetype/truetype/face.go generated vendored Normal file
View File

@ -0,0 +1,507 @@
// Copyright 2015 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
import (
"image"
"math"
"github.com/golang/freetype/raster"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
func powerOf2(i int) bool {
return i != 0 && (i&(i-1)) == 0
}
// Options are optional arguments to NewFace.
type Options struct {
// Size is the font size in points, as in "a 10 point font size".
//
// A zero value means to use a 12 point font size.
Size float64
// DPI is the dots-per-inch resolution.
//
// A zero value means to use 72 DPI.
DPI float64
// Hinting is how to quantize the glyph nodes.
//
// A zero value means to use no hinting.
Hinting font.Hinting
// GlyphCacheEntries is the number of entries in the glyph mask image
// cache.
//
// If non-zero, it must be a power of 2.
//
// A zero value means to use 512 entries.
GlyphCacheEntries int
// SubPixelsX is the number of sub-pixel locations a glyph's dot is
// quantized to, in the horizontal direction. For example, a value of 8
// means that the dot is quantized to 1/8th of a pixel. This quantization
// only affects the glyph mask image, not its bounding box or advance
// width. A higher value gives a more faithful glyph image, but reduces the
// effectiveness of the glyph cache.
//
// If non-zero, it must be a power of 2, and be between 1 and 64 inclusive.
//
// A zero value means to use 4 sub-pixel locations.
SubPixelsX int
// SubPixelsY is the number of sub-pixel locations a glyph's dot is
// quantized to, in the vertical direction. For example, a value of 8
// means that the dot is quantized to 1/8th of a pixel. This quantization
// only affects the glyph mask image, not its bounding box or advance
// width. A higher value gives a more faithful glyph image, but reduces the
// effectiveness of the glyph cache.
//
// If non-zero, it must be a power of 2, and be between 1 and 64 inclusive.
//
// A zero value means to use 1 sub-pixel location.
SubPixelsY int
}
func (o *Options) size() float64 {
if o != nil && o.Size > 0 {
return o.Size
}
return 12
}
func (o *Options) dpi() float64 {
if o != nil && o.DPI > 0 {
return o.DPI
}
return 72
}
func (o *Options) hinting() font.Hinting {
if o != nil {
switch o.Hinting {
case font.HintingVertical, font.HintingFull:
// TODO: support vertical hinting.
return font.HintingFull
}
}
return font.HintingNone
}
func (o *Options) glyphCacheEntries() int {
if o != nil && powerOf2(o.GlyphCacheEntries) {
return o.GlyphCacheEntries
}
// 512 is 128 * 4 * 1, which lets us cache 128 glyphs at 4 * 1 subpixel
// locations in the X and Y direction.
return 512
}
func (o *Options) subPixelsX() (value uint32, halfQuantum, mask fixed.Int26_6) {
if o != nil {
switch o.SubPixelsX {
case 1, 2, 4, 8, 16, 32, 64:
return subPixels(o.SubPixelsX)
}
}
// This default value of 4 isn't based on anything scientific, merely as
// small a number as possible that looks almost as good as no quantization,
// or returning subPixels(64).
return subPixels(4)
}
func (o *Options) subPixelsY() (value uint32, halfQuantum, mask fixed.Int26_6) {
if o != nil {
switch o.SubPixelsX {
case 1, 2, 4, 8, 16, 32, 64:
return subPixels(o.SubPixelsX)
}
}
// This default value of 1 isn't based on anything scientific, merely that
// vertical sub-pixel glyph rendering is pretty rare. Baseline locations
// can usually afford to snap to the pixel grid, so the vertical direction
// doesn't have the deal with the horizontal's fractional advance widths.
return subPixels(1)
}
// subPixels returns q and the bias and mask that leads to q quantized
// sub-pixel locations per full pixel.
//
// For example, q == 4 leads to a bias of 8 and a mask of 0xfffffff0, or -16,
// because we want to round fractions of fixed.Int26_6 as:
// - 0 to 7 rounds to 0.
// - 8 to 23 rounds to 16.
// - 24 to 39 rounds to 32.
// - 40 to 55 rounds to 48.
// - 56 to 63 rounds to 64.
// which means to add 8 and then bitwise-and with -16, in two's complement
// representation.
//
// When q == 1, we want bias == 32 and mask == -64.
// When q == 2, we want bias == 16 and mask == -32.
// When q == 4, we want bias == 8 and mask == -16.
// ...
// When q == 64, we want bias == 0 and mask == -1. (The no-op case).
// The pattern is clear.
func subPixels(q int) (value uint32, bias, mask fixed.Int26_6) {
return uint32(q), 32 / fixed.Int26_6(q), -64 / fixed.Int26_6(q)
}
// glyphCacheEntry caches the arguments and return values of rasterize.
type glyphCacheEntry struct {
key glyphCacheKey
val glyphCacheVal
}
type glyphCacheKey struct {
index Index
fx, fy uint8
}
type glyphCacheVal struct {
advanceWidth fixed.Int26_6
offset image.Point
gw int
gh int
}
type indexCacheEntry struct {
rune rune
index Index
}
// NewFace returns a new font.Face for the given Font.
func NewFace(f *Font, opts *Options) font.Face {
a := &face{
f: f,
hinting: opts.hinting(),
scale: fixed.Int26_6(0.5 + (opts.size() * opts.dpi() * 64 / 72)),
glyphCache: make([]glyphCacheEntry, opts.glyphCacheEntries()),
}
a.subPixelX, a.subPixelBiasX, a.subPixelMaskX = opts.subPixelsX()
a.subPixelY, a.subPixelBiasY, a.subPixelMaskY = opts.subPixelsY()
// Fill the cache with invalid entries. Valid glyph cache entries have fx
// and fy in the range [0, 64). Valid index cache entries have rune >= 0.
for i := range a.glyphCache {
a.glyphCache[i].key.fy = 0xff
}
for i := range a.indexCache {
a.indexCache[i].rune = -1
}
// Set the rasterizer's bounds to be big enough to handle the largest glyph.
b := f.Bounds(a.scale)
xmin := +int(b.Min.X) >> 6
ymin := -int(b.Max.Y) >> 6
xmax := +int(b.Max.X+63) >> 6
ymax := -int(b.Min.Y-63) >> 6
a.maxw = xmax - xmin
a.maxh = ymax - ymin
a.masks = image.NewAlpha(image.Rect(0, 0, a.maxw, a.maxh*len(a.glyphCache)))
a.r.SetBounds(a.maxw, a.maxh)
a.p = facePainter{a}
return a
}
type face struct {
f *Font
hinting font.Hinting
scale fixed.Int26_6
subPixelX uint32
subPixelBiasX fixed.Int26_6
subPixelMaskX fixed.Int26_6
subPixelY uint32
subPixelBiasY fixed.Int26_6
subPixelMaskY fixed.Int26_6
masks *image.Alpha
glyphCache []glyphCacheEntry
r raster.Rasterizer
p raster.Painter
paintOffset int
maxw int
maxh int
glyphBuf GlyphBuf
indexCache [indexCacheLen]indexCacheEntry
// TODO: clip rectangle?
}
const indexCacheLen = 256
func (a *face) index(r rune) Index {
const mask = indexCacheLen - 1
c := &a.indexCache[r&mask]
if c.rune == r {
return c.index
}
i := a.f.Index(r)
c.rune = r
c.index = i
return i
}
// Close satisfies the font.Face interface.
func (a *face) Close() error { return nil }
// Metrics satisfies the font.Face interface.
func (a *face) Metrics() font.Metrics {
scale := float64(a.scale)
fupe := float64(a.f.FUnitsPerEm())
return font.Metrics{
Height: a.scale,
Ascent: fixed.Int26_6(math.Ceil(scale * float64(+a.f.ascent) / fupe)),
Descent: fixed.Int26_6(math.Ceil(scale * float64(-a.f.descent) / fupe)),
}
}
// Kern satisfies the font.Face interface.
func (a *face) Kern(r0, r1 rune) fixed.Int26_6 {
i0 := a.index(r0)
i1 := a.index(r1)
kern := a.f.Kern(a.scale, i0, i1)
if a.hinting != font.HintingNone {
kern = (kern + 32) &^ 63
}
return kern
}
// Glyph satisfies the font.Face interface.
func (a *face) Glyph(dot fixed.Point26_6, r rune) (
dr image.Rectangle, mask image.Image, maskp image.Point, advance fixed.Int26_6, ok bool) {
// Quantize to the sub-pixel granularity.
dotX := (dot.X + a.subPixelBiasX) & a.subPixelMaskX
dotY := (dot.Y + a.subPixelBiasY) & a.subPixelMaskY
// Split the coordinates into their integer and fractional parts.
ix, fx := int(dotX>>6), dotX&0x3f
iy, fy := int(dotY>>6), dotY&0x3f
index := a.index(r)
cIndex := uint32(index)
cIndex = cIndex*a.subPixelX - uint32(fx/a.subPixelMaskX)
cIndex = cIndex*a.subPixelY - uint32(fy/a.subPixelMaskY)
cIndex &= uint32(len(a.glyphCache) - 1)
a.paintOffset = a.maxh * int(cIndex)
k := glyphCacheKey{
index: index,
fx: uint8(fx),
fy: uint8(fy),
}
var v glyphCacheVal
if a.glyphCache[cIndex].key != k {
var ok bool
v, ok = a.rasterize(index, fx, fy)
if !ok {
return image.Rectangle{}, nil, image.Point{}, 0, false
}
a.glyphCache[cIndex] = glyphCacheEntry{k, v}
} else {
v = a.glyphCache[cIndex].val
}
dr.Min = image.Point{
X: ix + v.offset.X,
Y: iy + v.offset.Y,
}
dr.Max = image.Point{
X: dr.Min.X + v.gw,
Y: dr.Min.Y + v.gh,
}
return dr, a.masks, image.Point{Y: a.paintOffset}, v.advanceWidth, true
}
func (a *face) GlyphBounds(r rune) (bounds fixed.Rectangle26_6, advance fixed.Int26_6, ok bool) {
if err := a.glyphBuf.Load(a.f, a.scale, a.index(r), a.hinting); err != nil {
return fixed.Rectangle26_6{}, 0, false
}
xmin := +a.glyphBuf.Bounds.Min.X
ymin := -a.glyphBuf.Bounds.Max.Y
xmax := +a.glyphBuf.Bounds.Max.X
ymax := -a.glyphBuf.Bounds.Min.Y
if xmin > xmax || ymin > ymax {
return fixed.Rectangle26_6{}, 0, false
}
return fixed.Rectangle26_6{
Min: fixed.Point26_6{
X: xmin,
Y: ymin,
},
Max: fixed.Point26_6{
X: xmax,
Y: ymax,
},
}, a.glyphBuf.AdvanceWidth, true
}
func (a *face) GlyphAdvance(r rune) (advance fixed.Int26_6, ok bool) {
if err := a.glyphBuf.Load(a.f, a.scale, a.index(r), a.hinting); err != nil {
return 0, false
}
return a.glyphBuf.AdvanceWidth, true
}
// rasterize returns the advance width, integer-pixel offset to render at, and
// the width and height of the given glyph at the given sub-pixel offsets.
//
// The 26.6 fixed point arguments fx and fy must be in the range [0, 1).
func (a *face) rasterize(index Index, fx, fy fixed.Int26_6) (v glyphCacheVal, ok bool) {
if err := a.glyphBuf.Load(a.f, a.scale, index, a.hinting); err != nil {
return glyphCacheVal{}, false
}
// Calculate the integer-pixel bounds for the glyph.
xmin := int(fx+a.glyphBuf.Bounds.Min.X) >> 6
ymin := int(fy-a.glyphBuf.Bounds.Max.Y) >> 6
xmax := int(fx+a.glyphBuf.Bounds.Max.X+0x3f) >> 6
ymax := int(fy-a.glyphBuf.Bounds.Min.Y+0x3f) >> 6
if xmin > xmax || ymin > ymax {
return glyphCacheVal{}, false
}
// A TrueType's glyph's nodes can have negative co-ordinates, but the
// rasterizer clips anything left of x=0 or above y=0. xmin and ymin are
// the pixel offsets, based on the font's FUnit metrics, that let a
// negative co-ordinate in TrueType space be non-negative in rasterizer
// space. xmin and ymin are typically <= 0.
fx -= fixed.Int26_6(xmin << 6)
fy -= fixed.Int26_6(ymin << 6)
// Rasterize the glyph's vectors.
a.r.Clear()
pixOffset := a.paintOffset * a.maxw
clear(a.masks.Pix[pixOffset : pixOffset+a.maxw*a.maxh])
e0 := 0
for _, e1 := range a.glyphBuf.Ends {
a.drawContour(a.glyphBuf.Points[e0:e1], fx, fy)
e0 = e1
}
a.r.Rasterize(a.p)
return glyphCacheVal{
a.glyphBuf.AdvanceWidth,
image.Point{xmin, ymin},
xmax - xmin,
ymax - ymin,
}, true
}
func clear(pix []byte) {
for i := range pix {
pix[i] = 0
}
}
// drawContour draws the given closed contour with the given offset.
func (a *face) drawContour(ps []Point, dx, dy fixed.Int26_6) {
if len(ps) == 0 {
return
}
// The low bit of each point's Flags value is whether the point is on the
// curve. Truetype fonts only have quadratic Bézier curves, not cubics.
// Thus, two consecutive off-curve points imply an on-curve point in the
// middle of those two.
//
// See http://chanae.walon.org/pub/ttf/ttf_glyphs.htm for more details.
// ps[0] is a truetype.Point measured in FUnits and positive Y going
// upwards. start is the same thing measured in fixed point units and
// positive Y going downwards, and offset by (dx, dy).
start := fixed.Point26_6{
X: dx + ps[0].X,
Y: dy - ps[0].Y,
}
var others []Point
if ps[0].Flags&0x01 != 0 {
others = ps[1:]
} else {
last := fixed.Point26_6{
X: dx + ps[len(ps)-1].X,
Y: dy - ps[len(ps)-1].Y,
}
if ps[len(ps)-1].Flags&0x01 != 0 {
start = last
others = ps[:len(ps)-1]
} else {
start = fixed.Point26_6{
X: (start.X + last.X) / 2,
Y: (start.Y + last.Y) / 2,
}
others = ps
}
}
a.r.Start(start)
q0, on0 := start, true
for _, p := range others {
q := fixed.Point26_6{
X: dx + p.X,
Y: dy - p.Y,
}
on := p.Flags&0x01 != 0
if on {
if on0 {
a.r.Add1(q)
} else {
a.r.Add2(q0, q)
}
} else {
if on0 {
// No-op.
} else {
mid := fixed.Point26_6{
X: (q0.X + q.X) / 2,
Y: (q0.Y + q.Y) / 2,
}
a.r.Add2(q0, mid)
}
}
q0, on0 = q, on
}
// Close the curve.
if on0 {
a.r.Add1(start)
} else {
a.r.Add2(q0, start)
}
}
// facePainter is like a raster.AlphaSrcPainter, with an additional Y offset
// (face.paintOffset) to the painted spans.
type facePainter struct {
a *face
}
func (p facePainter) Paint(ss []raster.Span, done bool) {
m := p.a.masks
b := m.Bounds()
b.Min.Y = p.a.paintOffset
b.Max.Y = p.a.paintOffset + p.a.maxh
for _, s := range ss {
s.Y += p.a.paintOffset
if s.Y < b.Min.Y {
continue
}
if s.Y >= b.Max.Y {
return
}
if s.X0 < b.Min.X {
s.X0 = b.Min.X
}
if s.X1 > b.Max.X {
s.X1 = b.Max.X
}
if s.X0 >= s.X1 {
continue
}
base := (s.Y-m.Rect.Min.Y)*m.Stride - m.Rect.Min.X
p := m.Pix[base+s.X0 : base+s.X1]
color := uint8(s.Alpha >> 8)
for i := range p {
p[i] = color
}
}
}

View File

@ -0,0 +1,48 @@
// Copyright 2015 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
import (
"image"
"image/draw"
"io/ioutil"
"strings"
"testing"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
func BenchmarkDrawString(b *testing.B) {
data, err := ioutil.ReadFile("../licenses/gpl.txt")
if err != nil {
b.Fatal(err)
}
lines := strings.Split(string(data), "\n")
data, err = ioutil.ReadFile("../testdata/luxisr.ttf")
if err != nil {
b.Fatal(err)
}
f, err := Parse(data)
if err != nil {
b.Fatal(err)
}
dst := image.NewRGBA(image.Rect(0, 0, 800, 600))
draw.Draw(dst, dst.Bounds(), image.White, image.ZP, draw.Src)
d := &font.Drawer{
Dst: dst,
Src: image.Black,
Face: NewFace(f, nil),
}
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
for j, line := range lines {
d.Dot = fixed.P(0, (j*16)%600)
d.DrawString(line)
}
}
}

522
vendor/github.com/golang/freetype/truetype/glyph.go generated vendored Normal file
View File

@ -0,0 +1,522 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
import (
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
// TODO: implement VerticalHinting.
// A Point is a co-ordinate pair plus whether it is 'on' a contour or an 'off'
// control point.
type Point struct {
X, Y fixed.Int26_6
// The Flags' LSB means whether or not this Point is 'on' the contour.
// Other bits are reserved for internal use.
Flags uint32
}
// A GlyphBuf holds a glyph's contours. A GlyphBuf can be re-used to load a
// series of glyphs from a Font.
type GlyphBuf struct {
// AdvanceWidth is the glyph's advance width.
AdvanceWidth fixed.Int26_6
// Bounds is the glyph's bounding box.
Bounds fixed.Rectangle26_6
// Points contains all Points from all contours of the glyph. If hinting
// was used to load a glyph then Unhinted contains those Points before they
// were hinted, and InFontUnits contains those Points before they were
// hinted and scaled.
Points, Unhinted, InFontUnits []Point
// Ends is the point indexes of the end point of each contour. The length
// of Ends is the number of contours in the glyph. The i'th contour
// consists of points Points[Ends[i-1]:Ends[i]], where Ends[-1] is
// interpreted to mean zero.
Ends []int
font *Font
scale fixed.Int26_6
hinting font.Hinting
hinter hinter
// phantomPoints are the co-ordinates of the synthetic phantom points
// used for hinting and bounding box calculations.
phantomPoints [4]Point
// pp1x is the X co-ordinate of the first phantom point. The '1' is
// using 1-based indexing; pp1x is almost always phantomPoints[0].X.
// TODO: eliminate this and consistently use phantomPoints[0].X.
pp1x fixed.Int26_6
// metricsSet is whether the glyph's metrics have been set yet. For a
// compound glyph, a sub-glyph may override the outer glyph's metrics.
metricsSet bool
// tmp is a scratch buffer.
tmp []Point
}
// Flags for decoding a glyph's contours. These flags are documented at
// http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html.
const (
flagOnCurve = 1 << iota
flagXShortVector
flagYShortVector
flagRepeat
flagPositiveXShortVector
flagPositiveYShortVector
// The remaining flags are for internal use.
flagTouchedX
flagTouchedY
)
// The same flag bits (0x10 and 0x20) are overloaded to have two meanings,
// dependent on the value of the flag{X,Y}ShortVector bits.
const (
flagThisXIsSame = flagPositiveXShortVector
flagThisYIsSame = flagPositiveYShortVector
)
// Load loads a glyph's contours from a Font, overwriting any previously loaded
// contours for this GlyphBuf. scale is the number of 26.6 fixed point units in
// 1 em, i is the glyph index, and h is the hinting policy.
func (g *GlyphBuf) Load(f *Font, scale fixed.Int26_6, i Index, h font.Hinting) error {
g.Points = g.Points[:0]
g.Unhinted = g.Unhinted[:0]
g.InFontUnits = g.InFontUnits[:0]
g.Ends = g.Ends[:0]
g.font = f
g.hinting = h
g.scale = scale
g.pp1x = 0
g.phantomPoints = [4]Point{}
g.metricsSet = false
if h != font.HintingNone {
if err := g.hinter.init(f, scale); err != nil {
return err
}
}
if err := g.load(0, i, true); err != nil {
return err
}
// TODO: this selection of either g.pp1x or g.phantomPoints[0].X isn't ideal,
// and should be cleaned up once we have all the testScaling tests passing,
// plus additional tests for Freetype-Go's bounding boxes matching C Freetype's.
pp1x := g.pp1x
if h != font.HintingNone {
pp1x = g.phantomPoints[0].X
}
if pp1x != 0 {
for i := range g.Points {
g.Points[i].X -= pp1x
}
}
advanceWidth := g.phantomPoints[1].X - g.phantomPoints[0].X
if h != font.HintingNone {
if len(f.hdmx) >= 8 {
if n := u32(f.hdmx, 4); n > 3+uint32(i) {
for hdmx := f.hdmx[8:]; uint32(len(hdmx)) >= n; hdmx = hdmx[n:] {
if fixed.Int26_6(hdmx[0]) == scale>>6 {
advanceWidth = fixed.Int26_6(hdmx[2+i]) << 6
break
}
}
}
}
advanceWidth = (advanceWidth + 32) &^ 63
}
g.AdvanceWidth = advanceWidth
// Set g.Bounds to the 'control box', which is the bounding box of the
// Bézier curves' control points. This is easier to calculate, no smaller
// than and often equal to the tightest possible bounding box of the curves
// themselves. This approach is what C Freetype does. We can't just scale
// the nominal bounding box in the glyf data as the hinting process and
// phantom point adjustment may move points outside of that box.
if len(g.Points) == 0 {
g.Bounds = fixed.Rectangle26_6{}
} else {
p := g.Points[0]
g.Bounds.Min.X = p.X
g.Bounds.Max.X = p.X
g.Bounds.Min.Y = p.Y
g.Bounds.Max.Y = p.Y
for _, p := range g.Points[1:] {
if g.Bounds.Min.X > p.X {
g.Bounds.Min.X = p.X
} else if g.Bounds.Max.X < p.X {
g.Bounds.Max.X = p.X
}
if g.Bounds.Min.Y > p.Y {
g.Bounds.Min.Y = p.Y
} else if g.Bounds.Max.Y < p.Y {
g.Bounds.Max.Y = p.Y
}
}
// Snap the box to the grid, if hinting is on.
if h != font.HintingNone {
g.Bounds.Min.X &^= 63
g.Bounds.Min.Y &^= 63
g.Bounds.Max.X += 63
g.Bounds.Max.X &^= 63
g.Bounds.Max.Y += 63
g.Bounds.Max.Y &^= 63
}
}
return nil
}
func (g *GlyphBuf) load(recursion uint32, i Index, useMyMetrics bool) (err error) {
// The recursion limit here is arbitrary, but defends against malformed glyphs.
if recursion >= 32 {
return UnsupportedError("excessive compound glyph recursion")
}
// Find the relevant slice of g.font.glyf.
var g0, g1 uint32
if g.font.locaOffsetFormat == locaOffsetFormatShort {
g0 = 2 * uint32(u16(g.font.loca, 2*int(i)))
g1 = 2 * uint32(u16(g.font.loca, 2*int(i)+2))
} else {
g0 = u32(g.font.loca, 4*int(i))
g1 = u32(g.font.loca, 4*int(i)+4)
}
// Decode the contour count and nominal bounding box, from the first
// 10 bytes of the glyf data. boundsYMin and boundsXMax, at offsets 4
// and 6, are unused.
glyf, ne, boundsXMin, boundsYMax := []byte(nil), 0, fixed.Int26_6(0), fixed.Int26_6(0)
if g0+10 <= g1 {
glyf = g.font.glyf[g0:g1]
ne = int(int16(u16(glyf, 0)))
boundsXMin = fixed.Int26_6(int16(u16(glyf, 2)))
boundsYMax = fixed.Int26_6(int16(u16(glyf, 8)))
}
// Create the phantom points.
uhm, pp1x := g.font.unscaledHMetric(i), fixed.Int26_6(0)
uvm := g.font.unscaledVMetric(i, boundsYMax)
g.phantomPoints = [4]Point{
{X: boundsXMin - uhm.LeftSideBearing},
{X: boundsXMin - uhm.LeftSideBearing + uhm.AdvanceWidth},
{X: uhm.AdvanceWidth / 2, Y: boundsYMax + uvm.TopSideBearing},
{X: uhm.AdvanceWidth / 2, Y: boundsYMax + uvm.TopSideBearing - uvm.AdvanceHeight},
}
if len(glyf) == 0 {
g.addPhantomsAndScale(len(g.Points), len(g.Points), true, true)
copy(g.phantomPoints[:], g.Points[len(g.Points)-4:])
g.Points = g.Points[:len(g.Points)-4]
// TODO: also trim g.InFontUnits and g.Unhinted?
return nil
}
// Load and hint the contours.
if ne < 0 {
if ne != -1 {
// http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html says that
// "the values -2, -3, and so forth, are reserved for future use."
return UnsupportedError("negative number of contours")
}
pp1x = g.font.scale(g.scale * (boundsXMin - uhm.LeftSideBearing))
if err := g.loadCompound(recursion, uhm, i, glyf, useMyMetrics); err != nil {
return err
}
} else {
np0, ne0 := len(g.Points), len(g.Ends)
program := g.loadSimple(glyf, ne)
g.addPhantomsAndScale(np0, np0, true, true)
pp1x = g.Points[len(g.Points)-4].X
if g.hinting != font.HintingNone {
if len(program) != 0 {
err := g.hinter.run(
program,
g.Points[np0:],
g.Unhinted[np0:],
g.InFontUnits[np0:],
g.Ends[ne0:],
)
if err != nil {
return err
}
}
// Drop the four phantom points.
g.InFontUnits = g.InFontUnits[:len(g.InFontUnits)-4]
g.Unhinted = g.Unhinted[:len(g.Unhinted)-4]
}
if useMyMetrics {
copy(g.phantomPoints[:], g.Points[len(g.Points)-4:])
}
g.Points = g.Points[:len(g.Points)-4]
if np0 != 0 {
// The hinting program expects the []Ends values to be indexed
// relative to the inner glyph, not the outer glyph, so we delay
// adding np0 until after the hinting program (if any) has run.
for i := ne0; i < len(g.Ends); i++ {
g.Ends[i] += np0
}
}
}
if useMyMetrics && !g.metricsSet {
g.metricsSet = true
g.pp1x = pp1x
}
return nil
}
// loadOffset is the initial offset for loadSimple and loadCompound. The first
// 10 bytes are the number of contours and the bounding box.
const loadOffset = 10
func (g *GlyphBuf) loadSimple(glyf []byte, ne int) (program []byte) {
offset := loadOffset
for i := 0; i < ne; i++ {
g.Ends = append(g.Ends, 1+int(u16(glyf, offset)))
offset += 2
}
// Note the TrueType hinting instructions.
instrLen := int(u16(glyf, offset))
offset += 2
program = glyf[offset : offset+instrLen]
offset += instrLen
if ne == 0 {
return program
}
np0 := len(g.Points)
np1 := np0 + int(g.Ends[len(g.Ends)-1])
// Decode the flags.
for i := np0; i < np1; {
c := uint32(glyf[offset])
offset++
g.Points = append(g.Points, Point{Flags: c})
i++
if c&flagRepeat != 0 {
count := glyf[offset]
offset++
for ; count > 0; count-- {
g.Points = append(g.Points, Point{Flags: c})
i++
}
}
}
// Decode the co-ordinates.
var x int16
for i := np0; i < np1; i++ {
f := g.Points[i].Flags
if f&flagXShortVector != 0 {
dx := int16(glyf[offset])
offset++
if f&flagPositiveXShortVector == 0 {
x -= dx
} else {
x += dx
}
} else if f&flagThisXIsSame == 0 {
x += int16(u16(glyf, offset))
offset += 2
}
g.Points[i].X = fixed.Int26_6(x)
}
var y int16
for i := np0; i < np1; i++ {
f := g.Points[i].Flags
if f&flagYShortVector != 0 {
dy := int16(glyf[offset])
offset++
if f&flagPositiveYShortVector == 0 {
y -= dy
} else {
y += dy
}
} else if f&flagThisYIsSame == 0 {
y += int16(u16(glyf, offset))
offset += 2
}
g.Points[i].Y = fixed.Int26_6(y)
}
return program
}
func (g *GlyphBuf) loadCompound(recursion uint32, uhm HMetric, i Index,
glyf []byte, useMyMetrics bool) error {
// Flags for decoding a compound glyph. These flags are documented at
// http://developer.apple.com/fonts/TTRefMan/RM06/Chap6glyf.html.
const (
flagArg1And2AreWords = 1 << iota
flagArgsAreXYValues
flagRoundXYToGrid
flagWeHaveAScale
flagUnused
flagMoreComponents
flagWeHaveAnXAndYScale
flagWeHaveATwoByTwo
flagWeHaveInstructions
flagUseMyMetrics
flagOverlapCompound
)
np0, ne0 := len(g.Points), len(g.Ends)
offset := loadOffset
for {
flags := u16(glyf, offset)
component := Index(u16(glyf, offset+2))
dx, dy, transform, hasTransform := fixed.Int26_6(0), fixed.Int26_6(0), [4]int16{}, false
if flags&flagArg1And2AreWords != 0 {
dx = fixed.Int26_6(int16(u16(glyf, offset+4)))
dy = fixed.Int26_6(int16(u16(glyf, offset+6)))
offset += 8
} else {
dx = fixed.Int26_6(int16(int8(glyf[offset+4])))
dy = fixed.Int26_6(int16(int8(glyf[offset+5])))
offset += 6
}
if flags&flagArgsAreXYValues == 0 {
return UnsupportedError("compound glyph transform vector")
}
if flags&(flagWeHaveAScale|flagWeHaveAnXAndYScale|flagWeHaveATwoByTwo) != 0 {
hasTransform = true
switch {
case flags&flagWeHaveAScale != 0:
transform[0] = int16(u16(glyf, offset+0))
transform[3] = transform[0]
offset += 2
case flags&flagWeHaveAnXAndYScale != 0:
transform[0] = int16(u16(glyf, offset+0))
transform[3] = int16(u16(glyf, offset+2))
offset += 4
case flags&flagWeHaveATwoByTwo != 0:
transform[0] = int16(u16(glyf, offset+0))
transform[1] = int16(u16(glyf, offset+2))
transform[2] = int16(u16(glyf, offset+4))
transform[3] = int16(u16(glyf, offset+6))
offset += 8
}
}
savedPP := g.phantomPoints
np0 := len(g.Points)
componentUMM := useMyMetrics && (flags&flagUseMyMetrics != 0)
if err := g.load(recursion+1, component, componentUMM); err != nil {
return err
}
if flags&flagUseMyMetrics == 0 {
g.phantomPoints = savedPP
}
if hasTransform {
for j := np0; j < len(g.Points); j++ {
p := &g.Points[j]
newX := 0 +
fixed.Int26_6((int64(p.X)*int64(transform[0])+1<<13)>>14) +
fixed.Int26_6((int64(p.Y)*int64(transform[2])+1<<13)>>14)
newY := 0 +
fixed.Int26_6((int64(p.X)*int64(transform[1])+1<<13)>>14) +
fixed.Int26_6((int64(p.Y)*int64(transform[3])+1<<13)>>14)
p.X, p.Y = newX, newY
}
}
dx = g.font.scale(g.scale * dx)
dy = g.font.scale(g.scale * dy)
if flags&flagRoundXYToGrid != 0 {
dx = (dx + 32) &^ 63
dy = (dy + 32) &^ 63
}
for j := np0; j < len(g.Points); j++ {
p := &g.Points[j]
p.X += dx
p.Y += dy
}
// TODO: also adjust g.InFontUnits and g.Unhinted?
if flags&flagMoreComponents == 0 {
break
}
}
instrLen := 0
if g.hinting != font.HintingNone && offset+2 <= len(glyf) {
instrLen = int(u16(glyf, offset))
offset += 2
}
g.addPhantomsAndScale(np0, len(g.Points), false, instrLen > 0)
points, ends := g.Points[np0:], g.Ends[ne0:]
g.Points = g.Points[:len(g.Points)-4]
for j := range points {
points[j].Flags &^= flagTouchedX | flagTouchedY
}
if instrLen == 0 {
if !g.metricsSet {
copy(g.phantomPoints[:], points[len(points)-4:])
}
return nil
}
// Hint the compound glyph.
program := glyf[offset : offset+instrLen]
// Temporarily adjust the ends to be relative to this compound glyph.
if np0 != 0 {
for i := range ends {
ends[i] -= np0
}
}
// Hinting instructions of a composite glyph completely refer to the
// (already) hinted subglyphs.
g.tmp = append(g.tmp[:0], points...)
if err := g.hinter.run(program, points, g.tmp, g.tmp, ends); err != nil {
return err
}
if np0 != 0 {
for i := range ends {
ends[i] += np0
}
}
if !g.metricsSet {
copy(g.phantomPoints[:], points[len(points)-4:])
}
return nil
}
func (g *GlyphBuf) addPhantomsAndScale(np0, np1 int, simple, adjust bool) {
// Add the four phantom points.
g.Points = append(g.Points, g.phantomPoints[:]...)
// Scale the points.
if simple && g.hinting != font.HintingNone {
g.InFontUnits = append(g.InFontUnits, g.Points[np1:]...)
}
for i := np1; i < len(g.Points); i++ {
p := &g.Points[i]
p.X = g.font.scale(g.scale * p.X)
p.Y = g.font.scale(g.scale * p.Y)
}
if g.hinting == font.HintingNone {
return
}
// Round the 1st phantom point to the grid, shifting all other points equally.
// Note that "all other points" starts from np0, not np1.
// TODO: delete this adjustment and the np0/np1 distinction, when
// we update the compatibility tests to C Freetype 2.5.3.
// See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=05c786d990390a7ca18e62962641dac740bacb06
if adjust {
pp1x := g.Points[len(g.Points)-4].X
if dx := ((pp1x + 32) &^ 63) - pp1x; dx != 0 {
for i := np0; i < len(g.Points); i++ {
g.Points[i].X += dx
}
}
}
if simple {
g.Unhinted = append(g.Unhinted, g.Points[np1:]...)
}
// Round the 2nd and 4th phantom point to the grid.
p := &g.Points[len(g.Points)-3]
p.X = (p.X + 32) &^ 63
p = &g.Points[len(g.Points)-1]
p.Y = (p.Y + 32) &^ 63
}

1770
vendor/github.com/golang/freetype/truetype/hint.go generated vendored Normal file

File diff suppressed because it is too large Load Diff

675
vendor/github.com/golang/freetype/truetype/hint_test.go generated vendored Normal file
View File

@ -0,0 +1,675 @@
// Copyright 2012 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
import (
"reflect"
"strings"
"testing"
"golang.org/x/image/math/fixed"
)
func TestBytecode(t *testing.T) {
testCases := []struct {
desc string
prog []byte
want []int32
errStr string
}{
{
"underflow",
[]byte{
opDUP,
},
nil,
"underflow",
},
{
"infinite loop",
[]byte{
opPUSHW000, // [-1]
0xff,
0xff,
opDUP, // [-1, -1]
opJMPR, // [-1]
},
nil,
"too many steps",
},
{
"unbalanced if/else",
[]byte{
opPUSHB000, // [0]
0,
opIF,
},
nil,
"unbalanced",
},
{
"vector set/gets",
[]byte{
opSVTCA1, // []
opGPV, // [0x4000, 0]
opSVTCA0, // [0x4000, 0]
opGFV, // [0x4000, 0, 0, 0x4000]
opNEG, // [0x4000, 0, 0, -0x4000]
opSPVFS, // [0x4000, 0]
opSFVTPV, // [0x4000, 0]
opPUSHB000, // [0x4000, 0, 1]
1,
opGFV, // [0x4000, 0, 1, 0, -0x4000]
opPUSHB000, // [0x4000, 0, 1, 0, -0x4000, 2]
2,
},
[]int32{0x4000, 0, 1, 0, -0x4000, 2},
"",
},
{
"jumps",
[]byte{
opPUSHB001, // [10, 2]
10,
2,
opJMPR, // [10]
opDUP, // not executed
opDUP, // [10, 10]
opPUSHB010, // [10, 10, 20, 2, 1]
20,
2,
1,
opJROT, // [10, 10, 20]
opDUP, // not executed
opDUP, // [10, 10, 20, 20]
opPUSHB010, // [10, 10, 20, 20, 30, 2, 1]
30,
2,
1,
opJROF, // [10, 10, 20, 20, 30]
opDUP, // [10, 10, 20, 20, 30, 30]
opDUP, // [10, 10, 20, 20, 30, 30, 30]
},
[]int32{10, 10, 20, 20, 30, 30, 30},
"",
},
{
"stack ops",
[]byte{
opPUSHB010, // [10, 20, 30]
10,
20,
30,
opCLEAR, // []
opPUSHB010, // [40, 50, 60]
40,
50,
60,
opSWAP, // [40, 60, 50]
opDUP, // [40, 60, 50, 50]
opDUP, // [40, 60, 50, 50, 50]
opPOP, // [40, 60, 50, 50]
opDEPTH, // [40, 60, 50, 50, 4]
opCINDEX, // [40, 60, 50, 50, 40]
opPUSHB000, // [40, 60, 50, 50, 40, 4]
4,
opMINDEX, // [40, 50, 50, 40, 60]
},
[]int32{40, 50, 50, 40, 60},
"",
},
{
"push ops",
[]byte{
opPUSHB000, // [255]
255,
opPUSHW001, // [255, -2, 253]
255,
254,
0,
253,
opNPUSHB, // [1, -2, 253, 1, 2]
2,
1,
2,
opNPUSHW, // [1, -2, 253, 1, 2, 0x0405, 0x0607, 0x0809]
3,
4,
5,
6,
7,
8,
9,
},
[]int32{255, -2, 253, 1, 2, 0x0405, 0x0607, 0x0809},
"",
},
{
"store ops",
[]byte{
opPUSHB011, // [1, 22, 3, 44]
1,
22,
3,
44,
opWS, // [1, 22]
opWS, // []
opPUSHB000, // [3]
3,
opRS, // [44]
},
[]int32{44},
"",
},
{
"comparison ops",
[]byte{
opPUSHB001, // [10, 20]
10,
20,
opLT, // [1]
opPUSHB001, // [1, 10, 20]
10,
20,
opLTEQ, // [1, 1]
opPUSHB001, // [1, 1, 10, 20]
10,
20,
opGT, // [1, 1, 0]
opPUSHB001, // [1, 1, 0, 10, 20]
10,
20,
opGTEQ, // [1, 1, 0, 0]
opEQ, // [1, 1, 1]
opNEQ, // [1, 0]
},
[]int32{1, 0},
"",
},
{
"odd/even",
// Calculate odd(2+31/64), odd(2+32/64), even(2), even(1).
[]byte{
opPUSHB000, // [159]
159,
opODD, // [0]
opPUSHB000, // [0, 160]
160,
opODD, // [0, 1]
opPUSHB000, // [0, 1, 128]
128,
opEVEN, // [0, 1, 1]
opPUSHB000, // [0, 1, 1, 64]
64,
opEVEN, // [0, 1, 1, 0]
},
[]int32{0, 1, 1, 0},
"",
},
{
"if true",
[]byte{
opPUSHB001, // [255, 1]
255,
1,
opIF,
opPUSHB000, // [255, 2]
2,
opEIF,
opPUSHB000, // [255, 2, 254]
254,
},
[]int32{255, 2, 254},
"",
},
{
"if false",
[]byte{
opPUSHB001, // [255, 0]
255,
0,
opIF,
opPUSHB000, // [255]
2,
opEIF,
opPUSHB000, // [255, 254]
254,
},
[]int32{255, 254},
"",
},
{
"if/else true",
[]byte{
opPUSHB000, // [1]
1,
opIF,
opPUSHB000, // [2]
2,
opELSE,
opPUSHB000, // not executed
3,
opEIF,
},
[]int32{2},
"",
},
{
"if/else false",
[]byte{
opPUSHB000, // [0]
0,
opIF,
opPUSHB000, // not executed
2,
opELSE,
opPUSHB000, // [3]
3,
opEIF,
},
[]int32{3},
"",
},
{
"if/else true if/else false",
// 0x58 is the opcode for opIF. The literal 0x58s below are pushed data.
[]byte{
opPUSHB010, // [255, 0, 1]
255,
0,
1,
opIF,
opIF,
opPUSHB001, // not executed
0x58,
0x58,
opELSE,
opPUSHW000, // [255, 0x5858]
0x58,
0x58,
opEIF,
opELSE,
opIF,
opNPUSHB, // not executed
3,
0x58,
0x58,
0x58,
opELSE,
opNPUSHW, // not executed
2,
0x58,
0x58,
0x58,
0x58,
opEIF,
opEIF,
opPUSHB000, // [255, 0x5858, 254]
254,
},
[]int32{255, 0x5858, 254},
"",
},
{
"if/else false if/else true",
// 0x58 is the opcode for opIF. The literal 0x58s below are pushed data.
[]byte{
opPUSHB010, // [255, 1, 0]
255,
1,
0,
opIF,
opIF,
opPUSHB001, // not executed
0x58,
0x58,
opELSE,
opPUSHW000, // not executed
0x58,
0x58,
opEIF,
opELSE,
opIF,
opNPUSHB, // [255, 0x58, 0x58, 0x58]
3,
0x58,
0x58,
0x58,
opELSE,
opNPUSHW, // not executed
2,
0x58,
0x58,
0x58,
0x58,
opEIF,
opEIF,
opPUSHB000, // [255, 0x58, 0x58, 0x58, 254]
254,
},
[]int32{255, 0x58, 0x58, 0x58, 254},
"",
},
{
"logical ops",
[]byte{
opPUSHB010, // [0, 10, 20]
0,
10,
20,
opAND, // [0, 1]
opOR, // [1]
opNOT, // [0]
},
[]int32{0},
"",
},
{
"arithmetic ops",
// Calculate abs((-(1 - (2*3)))/2 + 1/64).
// The answer is 5/2 + 1/64 in ideal numbers, or 161 in 26.6 fixed point math.
[]byte{
opPUSHB010, // [64, 128, 192]
1 << 6,
2 << 6,
3 << 6,
opMUL, // [64, 384]
opSUB, // [-320]
opNEG, // [320]
opPUSHB000, // [320, 128]
2 << 6,
opDIV, // [160]
opPUSHB000, // [160, 1]
1,
opADD, // [161]
opABS, // [161]
},
[]int32{161},
"",
},
{
"floor, ceiling",
[]byte{
opPUSHB000, // [96]
96,
opFLOOR, // [64]
opPUSHB000, // [64, 96]
96,
opCEILING, // [64, 128]
},
[]int32{64, 128},
"",
},
{
"rounding",
// Round 1.40625 (which is 90/64) under various rounding policies.
// See figure 20 of https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding
[]byte{
opROFF, // []
opPUSHB000, // [90]
90,
opROUND00, // [90]
opRTG, // [90]
opPUSHB000, // [90, 90]
90,
opROUND00, // [90, 64]
opRTHG, // [90, 64]
opPUSHB000, // [90, 64, 90]
90,
opROUND00, // [90, 64, 96]
opRDTG, // [90, 64, 96]
opPUSHB000, // [90, 64, 96, 90]
90,
opROUND00, // [90, 64, 96, 64]
opRUTG, // [90, 64, 96, 64]
opPUSHB000, // [90, 64, 96, 64, 90]
90,
opROUND00, // [90, 64, 96, 64, 128]
opRTDG, // [90, 64, 96, 64, 128]
opPUSHB000, // [90, 64, 96, 64, 128, 90]
90,
opROUND00, // [90, 64, 96, 64, 128, 96]
},
[]int32{90, 64, 96, 64, 128, 96},
"",
},
{
"super-rounding",
// See figure 20 of https://developer.apple.com/fonts/TTRefMan/RM02/Chap2.html#rounding
// and the sign preservation steps of the "Order of rounding operations" section.
[]byte{
opPUSHB000, // [0x58]
0x58,
opSROUND, // []
opPUSHW000, // [-81]
0xff,
0xaf,
opROUND00, // [-80]
opPUSHW000, // [-80, -80]
0xff,
0xb0,
opROUND00, // [-80, -80]
opPUSHW000, // [-80, -80, -17]
0xff,
0xef,
opROUND00, // [-80, -80, -16]
opPUSHW000, // [-80, -80, -16, -16]
0xff,
0xf0,
opROUND00, // [-80, -80, -16, -16]
opPUSHB000, // [-80, -80, -16, -16, 0]
0,
opROUND00, // [-80, -80, -16, -16, 16]
opPUSHB000, // [-80, -80, -16, -16, 16, 16]
16,
opROUND00, // [-80, -80, -16, -16, 16, 16]
opPUSHB000, // [-80, -80, -16, -16, 16, 16, 47]
47,
opROUND00, // [-80, -80, -16, -16, 16, 16, 16]
opPUSHB000, // [-80, -80, -16, -16, 16, 16, 16, 48]
48,
opROUND00, // [-80, -80, -16, -16, 16, 16, 16, 80]
},
[]int32{-80, -80, -16, -16, 16, 16, 16, 80},
"",
},
{
"roll",
[]byte{
opPUSHB010, // [1, 2, 3]
1,
2,
3,
opROLL, // [2, 3, 1]
},
[]int32{2, 3, 1},
"",
},
{
"max/min",
[]byte{
opPUSHW001, // [-2, -3]
0xff,
0xfe,
0xff,
0xfd,
opMAX, // [-2]
opPUSHW001, // [-2, -4, -5]
0xff,
0xfc,
0xff,
0xfb,
opMIN, // [-2, -5]
},
[]int32{-2, -5},
"",
},
{
"functions",
[]byte{
opPUSHB011, // [3, 7, 0, 3]
3,
7,
0,
3,
opFDEF, // Function #3 (not called)
opPUSHB000,
98,
opENDF,
opFDEF, // Function #0
opDUP,
opADD,
opENDF,
opFDEF, // Function #7
opPUSHB001,
10,
0,
opCALL,
opDUP,
opENDF,
opFDEF, // Function #3 (again)
opPUSHB000,
99,
opENDF,
opPUSHB001, // [2, 0]
2,
0,
opCALL, // [4]
opPUSHB000, // [4, 3]
3,
opLOOPCALL, // [99, 99, 99, 99]
opPUSHB000, // [99, 99, 99, 99, 7]
7,
opCALL, // [99, 99, 99, 99, 20, 20]
},
[]int32{99, 99, 99, 99, 20, 20},
"",
},
}
for _, tc := range testCases {
h := &hinter{}
h.init(&Font{
maxStorage: 32,
maxStackElements: 100,
}, 768)
err, errStr := h.run(tc.prog, nil, nil, nil, nil), ""
if err != nil {
errStr = err.Error()
}
if tc.errStr != "" {
if errStr == "" {
t.Errorf("%s: got no error, want %q", tc.desc, tc.errStr)
} else if !strings.Contains(errStr, tc.errStr) {
t.Errorf("%s: got error %q, want one containing %q", tc.desc, errStr, tc.errStr)
}
continue
}
if errStr != "" {
t.Errorf("%s: got error %q, want none", tc.desc, errStr)
continue
}
got := h.stack[:len(tc.want)]
if !reflect.DeepEqual(got, tc.want) {
t.Errorf("%s: got %v, want %v", tc.desc, got, tc.want)
continue
}
}
}
// TestMove tests that the hinter.move method matches the output of the C
// Freetype implementation.
func TestMove(t *testing.T) {
h, p := hinter{}, Point{}
testCases := []struct {
pvX, pvY, fvX, fvY f2dot14
wantX, wantY fixed.Int26_6
}{
{+0x4000, +0x0000, +0x4000, +0x0000, +1000, +0},
{+0x4000, +0x0000, -0x4000, +0x0000, +1000, +0},
{-0x4000, +0x0000, +0x4000, +0x0000, -1000, +0},
{-0x4000, +0x0000, -0x4000, +0x0000, -1000, +0},
{+0x0000, +0x4000, +0x0000, +0x4000, +0, +1000},
{+0x0000, +0x4000, +0x0000, -0x4000, +0, +1000},
{+0x4000, +0x0000, +0x2d41, +0x2d41, +1000, +1000},
{+0x4000, +0x0000, -0x2d41, +0x2d41, +1000, -1000},
{+0x4000, +0x0000, +0x2d41, -0x2d41, +1000, -1000},
{+0x4000, +0x0000, -0x2d41, -0x2d41, +1000, +1000},
{-0x4000, +0x0000, +0x2d41, +0x2d41, -1000, -1000},
{-0x4000, +0x0000, -0x2d41, +0x2d41, -1000, +1000},
{-0x4000, +0x0000, +0x2d41, -0x2d41, -1000, +1000},
{-0x4000, +0x0000, -0x2d41, -0x2d41, -1000, -1000},
{+0x376d, +0x2000, +0x2d41, +0x2d41, +732, +732},
{-0x376d, +0x2000, +0x2d41, +0x2d41, -2732, -2732},
{+0x376d, +0x2000, +0x2d41, -0x2d41, +2732, -2732},
{-0x376d, +0x2000, +0x2d41, -0x2d41, -732, +732},
{-0x376d, -0x2000, +0x2d41, +0x2d41, -732, -732},
{+0x376d, +0x2000, +0x4000, +0x0000, +1155, +0},
{+0x376d, +0x2000, +0x0000, +0x4000, +0, +2000},
}
for _, tc := range testCases {
p = Point{}
h.gs.pv = [2]f2dot14{tc.pvX, tc.pvY}
h.gs.fv = [2]f2dot14{tc.fvX, tc.fvY}
h.move(&p, 1000, true)
tx := p.Flags&flagTouchedX != 0
ty := p.Flags&flagTouchedY != 0
wantTX := tc.fvX != 0
wantTY := tc.fvY != 0
if p.X != tc.wantX || p.Y != tc.wantY || tx != wantTX || ty != wantTY {
t.Errorf("pv=%v, fv=%v\ngot %d, %d, %t, %t\nwant %d, %d, %t, %t",
h.gs.pv, h.gs.fv, p.X, p.Y, tx, ty, tc.wantX, tc.wantY, wantTX, wantTY)
continue
}
// Check that p is aligned with the freedom vector.
a := int64(p.X) * int64(tc.fvY)
b := int64(p.Y) * int64(tc.fvX)
if a != b {
t.Errorf("pv=%v, fv=%v, p=%v not aligned with fv", h.gs.pv, h.gs.fv, p)
continue
}
// Check that the projected p is 1000 away from the origin.
dotProd := (int64(p.X)*int64(tc.pvX) + int64(p.Y)*int64(tc.pvY) + 1<<13) >> 14
if dotProd != 1000 {
t.Errorf("pv=%v, fv=%v, p=%v not 1000 from origin", h.gs.pv, h.gs.fv, p)
continue
}
}
}
// TestNormalize tests that the normalize function matches the output of the C
// Freetype implementation.
func TestNormalize(t *testing.T) {
testCases := [][2]f2dot14{
{-15895, 3974},
{-15543, 5181},
{-14654, 7327},
{-11585, 11585},
{0, 16384},
{11585, 11585},
{14654, 7327},
{15543, 5181},
{15895, 3974},
{16066, 3213},
{16161, 2694},
{16219, 2317},
{16257, 2032},
{16284, 1809},
}
for i, want := range testCases {
got := normalize(f2dot14(i)-4, 1)
if got != want {
t.Errorf("i=%d: got %v, want %v", i, got, want)
}
}
}

289
vendor/github.com/golang/freetype/truetype/opcodes.go generated vendored Normal file
View File

@ -0,0 +1,289 @@
// Copyright 2012 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
// The Truetype opcodes are summarized at
// https://developer.apple.com/fonts/TTRefMan/RM07/appendixA.html
const (
opSVTCA0 = 0x00 // Set freedom and projection Vectors To Coordinate Axis
opSVTCA1 = 0x01 // .
opSPVTCA0 = 0x02 // Set Projection Vector To Coordinate Axis
opSPVTCA1 = 0x03 // .
opSFVTCA0 = 0x04 // Set Freedom Vector to Coordinate Axis
opSFVTCA1 = 0x05 // .
opSPVTL0 = 0x06 // Set Projection Vector To Line
opSPVTL1 = 0x07 // .
opSFVTL0 = 0x08 // Set Freedom Vector To Line
opSFVTL1 = 0x09 // .
opSPVFS = 0x0a // Set Projection Vector From Stack
opSFVFS = 0x0b // Set Freedom Vector From Stack
opGPV = 0x0c // Get Projection Vector
opGFV = 0x0d // Get Freedom Vector
opSFVTPV = 0x0e // Set Freedom Vector To Projection Vector
opISECT = 0x0f // moves point p to the InterSECTion of two lines
opSRP0 = 0x10 // Set Reference Point 0
opSRP1 = 0x11 // Set Reference Point 1
opSRP2 = 0x12 // Set Reference Point 2
opSZP0 = 0x13 // Set Zone Pointer 0
opSZP1 = 0x14 // Set Zone Pointer 1
opSZP2 = 0x15 // Set Zone Pointer 2
opSZPS = 0x16 // Set Zone PointerS
opSLOOP = 0x17 // Set LOOP variable
opRTG = 0x18 // Round To Grid
opRTHG = 0x19 // Round To Half Grid
opSMD = 0x1a // Set Minimum Distance
opELSE = 0x1b // ELSE clause
opJMPR = 0x1c // JuMP Relative
opSCVTCI = 0x1d // Set Control Value Table Cut-In
opSSWCI = 0x1e // Set Single Width Cut-In
opSSW = 0x1f // Set Single Width
opDUP = 0x20 // DUPlicate top stack element
opPOP = 0x21 // POP top stack element
opCLEAR = 0x22 // CLEAR the stack
opSWAP = 0x23 // SWAP the top two elements on the stack
opDEPTH = 0x24 // DEPTH of the stack
opCINDEX = 0x25 // Copy the INDEXed element to the top of the stack
opMINDEX = 0x26 // Move the INDEXed element to the top of the stack
opALIGNPTS = 0x27 // ALIGN PoinTS
op_0x28 = 0x28 // deprecated
opUTP = 0x29 // UnTouch Point
opLOOPCALL = 0x2a // LOOP and CALL function
opCALL = 0x2b // CALL function
opFDEF = 0x2c // Function DEFinition
opENDF = 0x2d // END Function definition
opMDAP0 = 0x2e // Move Direct Absolute Point
opMDAP1 = 0x2f // .
opIUP0 = 0x30 // Interpolate Untouched Points through the outline
opIUP1 = 0x31 // .
opSHP0 = 0x32 // SHift Point using reference point
opSHP1 = 0x33 // .
opSHC0 = 0x34 // SHift Contour using reference point
opSHC1 = 0x35 // .
opSHZ0 = 0x36 // SHift Zone using reference point
opSHZ1 = 0x37 // .
opSHPIX = 0x38 // SHift point by a PIXel amount
opIP = 0x39 // Interpolate Point
opMSIRP0 = 0x3a // Move Stack Indirect Relative Point
opMSIRP1 = 0x3b // .
opALIGNRP = 0x3c // ALIGN to Reference Point
opRTDG = 0x3d // Round To Double Grid
opMIAP0 = 0x3e // Move Indirect Absolute Point
opMIAP1 = 0x3f // .
opNPUSHB = 0x40 // PUSH N Bytes
opNPUSHW = 0x41 // PUSH N Words
opWS = 0x42 // Write Store
opRS = 0x43 // Read Store
opWCVTP = 0x44 // Write Control Value Table in Pixel units
opRCVT = 0x45 // Read Control Value Table entry
opGC0 = 0x46 // Get Coordinate projected onto the projection vector
opGC1 = 0x47 // .
opSCFS = 0x48 // Sets Coordinate From the Stack using projection vector and freedom vector
opMD0 = 0x49 // Measure Distance
opMD1 = 0x4a // .
opMPPEM = 0x4b // Measure Pixels Per EM
opMPS = 0x4c // Measure Point Size
opFLIPON = 0x4d // set the auto FLIP Boolean to ON
opFLIPOFF = 0x4e // set the auto FLIP Boolean to OFF
opDEBUG = 0x4f // DEBUG call
opLT = 0x50 // Less Than
opLTEQ = 0x51 // Less Than or EQual
opGT = 0x52 // Greater Than
opGTEQ = 0x53 // Greater Than or EQual
opEQ = 0x54 // EQual
opNEQ = 0x55 // Not EQual
opODD = 0x56 // ODD
opEVEN = 0x57 // EVEN
opIF = 0x58 // IF test
opEIF = 0x59 // End IF
opAND = 0x5a // logical AND
opOR = 0x5b // logical OR
opNOT = 0x5c // logical NOT
opDELTAP1 = 0x5d // DELTA exception P1
opSDB = 0x5e // Set Delta Base in the graphics state
opSDS = 0x5f // Set Delta Shift in the graphics state
opADD = 0x60 // ADD
opSUB = 0x61 // SUBtract
opDIV = 0x62 // DIVide
opMUL = 0x63 // MULtiply
opABS = 0x64 // ABSolute value
opNEG = 0x65 // NEGate
opFLOOR = 0x66 // FLOOR
opCEILING = 0x67 // CEILING
opROUND00 = 0x68 // ROUND value
opROUND01 = 0x69 // .
opROUND10 = 0x6a // .
opROUND11 = 0x6b // .
opNROUND00 = 0x6c // No ROUNDing of value
opNROUND01 = 0x6d // .
opNROUND10 = 0x6e // .
opNROUND11 = 0x6f // .
opWCVTF = 0x70 // Write Control Value Table in Funits
opDELTAP2 = 0x71 // DELTA exception P2
opDELTAP3 = 0x72 // DELTA exception P3
opDELTAC1 = 0x73 // DELTA exception C1
opDELTAC2 = 0x74 // DELTA exception C2
opDELTAC3 = 0x75 // DELTA exception C3
opSROUND = 0x76 // Super ROUND
opS45ROUND = 0x77 // Super ROUND 45 degrees
opJROT = 0x78 // Jump Relative On True
opJROF = 0x79 // Jump Relative On False
opROFF = 0x7a // Round OFF
op_0x7b = 0x7b // deprecated
opRUTG = 0x7c // Round Up To Grid
opRDTG = 0x7d // Round Down To Grid
opSANGW = 0x7e // Set ANGle Weight
opAA = 0x7f // Adjust Angle
opFLIPPT = 0x80 // FLIP PoinT
opFLIPRGON = 0x81 // FLIP RanGe ON
opFLIPRGOFF = 0x82 // FLIP RanGe OFF
op_0x83 = 0x83 // deprecated
op_0x84 = 0x84 // deprecated
opSCANCTRL = 0x85 // SCAN conversion ConTRoL
opSDPVTL0 = 0x86 // Set Dual Projection Vector To Line
opSDPVTL1 = 0x87 // .
opGETINFO = 0x88 // GET INFOrmation
opIDEF = 0x89 // Instruction DEFinition
opROLL = 0x8a // ROLL the top three stack elements
opMAX = 0x8b // MAXimum of top two stack elements
opMIN = 0x8c // MINimum of top two stack elements
opSCANTYPE = 0x8d // SCANTYPE
opINSTCTRL = 0x8e // INSTRuction execution ConTRoL
op_0x8f = 0x8f
op_0x90 = 0x90
op_0x91 = 0x91
op_0x92 = 0x92
op_0x93 = 0x93
op_0x94 = 0x94
op_0x95 = 0x95
op_0x96 = 0x96
op_0x97 = 0x97
op_0x98 = 0x98
op_0x99 = 0x99
op_0x9a = 0x9a
op_0x9b = 0x9b
op_0x9c = 0x9c
op_0x9d = 0x9d
op_0x9e = 0x9e
op_0x9f = 0x9f
op_0xa0 = 0xa0
op_0xa1 = 0xa1
op_0xa2 = 0xa2
op_0xa3 = 0xa3
op_0xa4 = 0xa4
op_0xa5 = 0xa5
op_0xa6 = 0xa6
op_0xa7 = 0xa7
op_0xa8 = 0xa8
op_0xa9 = 0xa9
op_0xaa = 0xaa
op_0xab = 0xab
op_0xac = 0xac
op_0xad = 0xad
op_0xae = 0xae
op_0xaf = 0xaf
opPUSHB000 = 0xb0 // PUSH Bytes
opPUSHB001 = 0xb1 // .
opPUSHB010 = 0xb2 // .
opPUSHB011 = 0xb3 // .
opPUSHB100 = 0xb4 // .
opPUSHB101 = 0xb5 // .
opPUSHB110 = 0xb6 // .
opPUSHB111 = 0xb7 // .
opPUSHW000 = 0xb8 // PUSH Words
opPUSHW001 = 0xb9 // .
opPUSHW010 = 0xba // .
opPUSHW011 = 0xbb // .
opPUSHW100 = 0xbc // .
opPUSHW101 = 0xbd // .
opPUSHW110 = 0xbe // .
opPUSHW111 = 0xbf // .
opMDRP00000 = 0xc0 // Move Direct Relative Point
opMDRP00001 = 0xc1 // .
opMDRP00010 = 0xc2 // .
opMDRP00011 = 0xc3 // .
opMDRP00100 = 0xc4 // .
opMDRP00101 = 0xc5 // .
opMDRP00110 = 0xc6 // .
opMDRP00111 = 0xc7 // .
opMDRP01000 = 0xc8 // .
opMDRP01001 = 0xc9 // .
opMDRP01010 = 0xca // .
opMDRP01011 = 0xcb // .
opMDRP01100 = 0xcc // .
opMDRP01101 = 0xcd // .
opMDRP01110 = 0xce // .
opMDRP01111 = 0xcf // .
opMDRP10000 = 0xd0 // .
opMDRP10001 = 0xd1 // .
opMDRP10010 = 0xd2 // .
opMDRP10011 = 0xd3 // .
opMDRP10100 = 0xd4 // .
opMDRP10101 = 0xd5 // .
opMDRP10110 = 0xd6 // .
opMDRP10111 = 0xd7 // .
opMDRP11000 = 0xd8 // .
opMDRP11001 = 0xd9 // .
opMDRP11010 = 0xda // .
opMDRP11011 = 0xdb // .
opMDRP11100 = 0xdc // .
opMDRP11101 = 0xdd // .
opMDRP11110 = 0xde // .
opMDRP11111 = 0xdf // .
opMIRP00000 = 0xe0 // Move Indirect Relative Point
opMIRP00001 = 0xe1 // .
opMIRP00010 = 0xe2 // .
opMIRP00011 = 0xe3 // .
opMIRP00100 = 0xe4 // .
opMIRP00101 = 0xe5 // .
opMIRP00110 = 0xe6 // .
opMIRP00111 = 0xe7 // .
opMIRP01000 = 0xe8 // .
opMIRP01001 = 0xe9 // .
opMIRP01010 = 0xea // .
opMIRP01011 = 0xeb // .
opMIRP01100 = 0xec // .
opMIRP01101 = 0xed // .
opMIRP01110 = 0xee // .
opMIRP01111 = 0xef // .
opMIRP10000 = 0xf0 // .
opMIRP10001 = 0xf1 // .
opMIRP10010 = 0xf2 // .
opMIRP10011 = 0xf3 // .
opMIRP10100 = 0xf4 // .
opMIRP10101 = 0xf5 // .
opMIRP10110 = 0xf6 // .
opMIRP10111 = 0xf7 // .
opMIRP11000 = 0xf8 // .
opMIRP11001 = 0xf9 // .
opMIRP11010 = 0xfa // .
opMIRP11011 = 0xfb // .
opMIRP11100 = 0xfc // .
opMIRP11101 = 0xfd // .
opMIRP11110 = 0xfe // .
opMIRP11111 = 0xff // .
)
// popCount is the number of stack elements that each opcode pops.
var popCount = [256]uint8{
// 1, 2, 3, 4, 5, 6, 7, 8, 9, a, b, c, d, e, f
0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 0, 0, 0, 5, // 0x00 - 0x0f
1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1, 1, // 0x10 - 0x1f
1, 1, 0, 2, 0, 1, 1, 2, 0, 1, 2, 1, 1, 0, 1, 1, // 0x20 - 0x2f
0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 2, 2, 0, 0, 2, 2, // 0x30 - 0x3f
0, 0, 2, 1, 2, 1, 1, 1, 2, 2, 2, 0, 0, 0, 0, 0, // 0x40 - 0x4f
2, 2, 2, 2, 2, 2, 1, 1, 1, 0, 2, 2, 1, 1, 1, 1, // 0x50 - 0x5f
2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0x60 - 0x6f
2, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 1, 1, // 0x70 - 0x7f
0, 2, 2, 0, 0, 1, 2, 2, 1, 1, 3, 2, 2, 1, 2, 0, // 0x80 - 0x8f
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x90 - 0x9f
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xa0 - 0xaf
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0xb0 - 0xbf
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xc0 - 0xcf
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, // 0xd0 - 0xdf
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xe0 - 0xef
2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, // 0xf0 - 0xff
}

653
vendor/github.com/golang/freetype/truetype/truetype.go generated vendored Normal file
View File

@ -0,0 +1,653 @@
// Copyright 2010 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
// Package truetype provides a parser for the TTF and TTC file formats.
// Those formats are documented at http://developer.apple.com/fonts/TTRefMan/
// and http://www.microsoft.com/typography/otspec/
//
// Some of a font's methods provide lengths or co-ordinates, e.g. bounds, font
// metrics and control points. All these methods take a scale parameter, which
// is the number of pixels in 1 em, expressed as a 26.6 fixed point value. For
// example, if 1 em is 10 pixels then scale is fixed.I(10), which is equal to
// fixed.Int26_6(10 << 6).
//
// To measure a TrueType font in ideal FUnit space, use scale equal to
// font.FUnitsPerEm().
package truetype // import "github.com/golang/freetype/truetype"
import (
"fmt"
"golang.org/x/image/math/fixed"
)
// An Index is a Font's index of a rune.
type Index uint16
// A NameID identifies a name table entry.
//
// See https://developer.apple.com/fonts/TrueType-Reference-Manual/RM06/Chap6name.html
type NameID uint16
const (
NameIDCopyright NameID = 0
NameIDFontFamily = 1
NameIDFontSubfamily = 2
NameIDUniqueSubfamilyID = 3
NameIDFontFullName = 4
NameIDNameTableVersion = 5
NameIDPostscriptName = 6
NameIDTrademarkNotice = 7
NameIDManufacturerName = 8
NameIDDesignerName = 9
NameIDFontDescription = 10
NameIDFontVendorURL = 11
NameIDFontDesignerURL = 12
NameIDFontLicense = 13
NameIDFontLicenseURL = 14
NameIDPreferredFamily = 16
NameIDPreferredSubfamily = 17
NameIDCompatibleName = 18
NameIDSampleText = 19
)
const (
// A 32-bit encoding consists of a most-significant 16-bit Platform ID and a
// least-significant 16-bit Platform Specific ID. The magic numbers are
// specified at https://www.microsoft.com/typography/otspec/name.htm
unicodeEncodingBMPOnly = 0x00000003 // PID = 0 (Unicode), PSID = 3 (Unicode 2.0 BMP Only)
unicodeEncodingFull = 0x00000004 // PID = 0 (Unicode), PSID = 4 (Unicode 2.0 Full Repertoire)
microsoftSymbolEncoding = 0x00030000 // PID = 3 (Microsoft), PSID = 0 (Symbol)
microsoftUCS2Encoding = 0x00030001 // PID = 3 (Microsoft), PSID = 1 (UCS-2)
microsoftUCS4Encoding = 0x0003000a // PID = 3 (Microsoft), PSID = 10 (UCS-4)
)
// An HMetric holds the horizontal metrics of a single glyph.
type HMetric struct {
AdvanceWidth, LeftSideBearing fixed.Int26_6
}
// A VMetric holds the vertical metrics of a single glyph.
type VMetric struct {
AdvanceHeight, TopSideBearing fixed.Int26_6
}
// A FormatError reports that the input is not a valid TrueType font.
type FormatError string
func (e FormatError) Error() string {
return "freetype: invalid TrueType format: " + string(e)
}
// An UnsupportedError reports that the input uses a valid but unimplemented
// TrueType feature.
type UnsupportedError string
func (e UnsupportedError) Error() string {
return "freetype: unsupported TrueType feature: " + string(e)
}
// u32 returns the big-endian uint32 at b[i:].
func u32(b []byte, i int) uint32 {
return uint32(b[i])<<24 | uint32(b[i+1])<<16 | uint32(b[i+2])<<8 | uint32(b[i+3])
}
// u16 returns the big-endian uint16 at b[i:].
func u16(b []byte, i int) uint16 {
return uint16(b[i])<<8 | uint16(b[i+1])
}
// readTable returns a slice of the TTF data given by a table's directory entry.
func readTable(ttf []byte, offsetLength []byte) ([]byte, error) {
offset := int(u32(offsetLength, 0))
if offset < 0 {
return nil, FormatError(fmt.Sprintf("offset too large: %d", uint32(offset)))
}
length := int(u32(offsetLength, 4))
if length < 0 {
return nil, FormatError(fmt.Sprintf("length too large: %d", uint32(length)))
}
end := offset + length
if end < 0 || end > len(ttf) {
return nil, FormatError(fmt.Sprintf("offset + length too large: %d", uint32(offset)+uint32(length)))
}
return ttf[offset:end], nil
}
// parseSubtables returns the offset and platformID of the best subtable in
// table, where best favors a Unicode cmap encoding, and failing that, a
// Microsoft cmap encoding. offset is the offset of the first subtable in
// table, and size is the size of each subtable.
//
// If pred is non-nil, then only subtables that satisfy that predicate will be
// considered.
func parseSubtables(table []byte, name string, offset, size int, pred func([]byte) bool) (
bestOffset int, bestPID uint32, retErr error) {
if len(table) < 4 {
return 0, 0, FormatError(name + " too short")
}
nSubtables := int(u16(table, 2))
if len(table) < size*nSubtables+offset {
return 0, 0, FormatError(name + " too short")
}
ok := false
for i := 0; i < nSubtables; i, offset = i+1, offset+size {
if pred != nil && !pred(table[offset:]) {
continue
}
// We read the 16-bit Platform ID and 16-bit Platform Specific ID as a single uint32.
// All values are big-endian.
pidPsid := u32(table, offset)
// We prefer the Unicode cmap encoding. Failing to find that, we fall
// back onto the Microsoft cmap encoding.
if pidPsid == unicodeEncodingBMPOnly || pidPsid == unicodeEncodingFull {
bestOffset, bestPID, ok = offset, pidPsid>>16, true
break
} else if pidPsid == microsoftSymbolEncoding ||
pidPsid == microsoftUCS2Encoding ||
pidPsid == microsoftUCS4Encoding {
bestOffset, bestPID, ok = offset, pidPsid>>16, true
// We don't break out of the for loop, so that Unicode can override Microsoft.
}
}
if !ok {
return 0, 0, UnsupportedError(name + " encoding")
}
return bestOffset, bestPID, nil
}
const (
locaOffsetFormatUnknown int = iota
locaOffsetFormatShort
locaOffsetFormatLong
)
// A cm holds a parsed cmap entry.
type cm struct {
start, end, delta, offset uint32
}
// A Font represents a Truetype font.
type Font struct {
// Tables sliced from the TTF data. The different tables are documented
// at http://developer.apple.com/fonts/TTRefMan/RM06/Chap6.html
cmap, cvt, fpgm, glyf, hdmx, head, hhea, hmtx, kern, loca, maxp, name, os2, prep, vmtx []byte
cmapIndexes []byte
// Cached values derived from the raw ttf data.
cm []cm
locaOffsetFormat int
nGlyph, nHMetric, nKern int
fUnitsPerEm int32
ascent int32 // In FUnits.
descent int32 // In FUnits; typically negative.
bounds fixed.Rectangle26_6 // In FUnits.
// Values from the maxp section.
maxTwilightPoints, maxStorage, maxFunctionDefs, maxStackElements uint16
}
func (f *Font) parseCmap() error {
const (
cmapFormat4 = 4
cmapFormat12 = 12
languageIndependent = 0
)
offset, _, err := parseSubtables(f.cmap, "cmap", 4, 8, nil)
if err != nil {
return err
}
offset = int(u32(f.cmap, offset+4))
if offset <= 0 || offset > len(f.cmap) {
return FormatError("bad cmap offset")
}
cmapFormat := u16(f.cmap, offset)
switch cmapFormat {
case cmapFormat4:
language := u16(f.cmap, offset+4)
if language != languageIndependent {
return UnsupportedError(fmt.Sprintf("language: %d", language))
}
segCountX2 := int(u16(f.cmap, offset+6))
if segCountX2%2 == 1 {
return FormatError(fmt.Sprintf("bad segCountX2: %d", segCountX2))
}
segCount := segCountX2 / 2
offset += 14
f.cm = make([]cm, segCount)
for i := 0; i < segCount; i++ {
f.cm[i].end = uint32(u16(f.cmap, offset))
offset += 2
}
offset += 2
for i := 0; i < segCount; i++ {
f.cm[i].start = uint32(u16(f.cmap, offset))
offset += 2
}
for i := 0; i < segCount; i++ {
f.cm[i].delta = uint32(u16(f.cmap, offset))
offset += 2
}
for i := 0; i < segCount; i++ {
f.cm[i].offset = uint32(u16(f.cmap, offset))
offset += 2
}
f.cmapIndexes = f.cmap[offset:]
return nil
case cmapFormat12:
if u16(f.cmap, offset+2) != 0 {
return FormatError(fmt.Sprintf("cmap format: % x", f.cmap[offset:offset+4]))
}
length := u32(f.cmap, offset+4)
language := u32(f.cmap, offset+8)
if language != languageIndependent {
return UnsupportedError(fmt.Sprintf("language: %d", language))
}
nGroups := u32(f.cmap, offset+12)
if length != 12*nGroups+16 {
return FormatError("inconsistent cmap length")
}
offset += 16
f.cm = make([]cm, nGroups)
for i := uint32(0); i < nGroups; i++ {
f.cm[i].start = u32(f.cmap, offset+0)
f.cm[i].end = u32(f.cmap, offset+4)
f.cm[i].delta = u32(f.cmap, offset+8) - f.cm[i].start
offset += 12
}
return nil
}
return UnsupportedError(fmt.Sprintf("cmap format: %d", cmapFormat))
}
func (f *Font) parseHead() error {
if len(f.head) != 54 {
return FormatError(fmt.Sprintf("bad head length: %d", len(f.head)))
}
f.fUnitsPerEm = int32(u16(f.head, 18))
f.bounds.Min.X = fixed.Int26_6(int16(u16(f.head, 36)))
f.bounds.Min.Y = fixed.Int26_6(int16(u16(f.head, 38)))
f.bounds.Max.X = fixed.Int26_6(int16(u16(f.head, 40)))
f.bounds.Max.Y = fixed.Int26_6(int16(u16(f.head, 42)))
switch i := u16(f.head, 50); i {
case 0:
f.locaOffsetFormat = locaOffsetFormatShort
case 1:
f.locaOffsetFormat = locaOffsetFormatLong
default:
return FormatError(fmt.Sprintf("bad indexToLocFormat: %d", i))
}
return nil
}
func (f *Font) parseHhea() error {
if len(f.hhea) != 36 {
return FormatError(fmt.Sprintf("bad hhea length: %d", len(f.hhea)))
}
f.ascent = int32(int16(u16(f.hhea, 4)))
f.descent = int32(int16(u16(f.hhea, 6)))
f.nHMetric = int(u16(f.hhea, 34))
if 4*f.nHMetric+2*(f.nGlyph-f.nHMetric) != len(f.hmtx) {
return FormatError(fmt.Sprintf("bad hmtx length: %d", len(f.hmtx)))
}
return nil
}
func (f *Font) parseKern() error {
// Apple's TrueType documentation (http://developer.apple.com/fonts/TTRefMan/RM06/Chap6kern.html) says:
// "Previous versions of the 'kern' table defined both the version and nTables fields in the header
// as UInt16 values and not UInt32 values. Use of the older format on the Mac OS is discouraged
// (although AAT can sense an old kerning table and still make correct use of it). Microsoft
// Windows still uses the older format for the 'kern' table and will not recognize the newer one.
// Fonts targeted for the Mac OS only should use the new format; fonts targeted for both the Mac OS
// and Windows should use the old format."
// Since we expect that almost all fonts aim to be Windows-compatible, we only parse the "older" format,
// just like the C Freetype implementation.
if len(f.kern) == 0 {
if f.nKern != 0 {
return FormatError("bad kern table length")
}
return nil
}
if len(f.kern) < 18 {
return FormatError("kern data too short")
}
version, offset := u16(f.kern, 0), 2
if version != 0 {
return UnsupportedError(fmt.Sprintf("kern version: %d", version))
}
n, offset := u16(f.kern, offset), offset+2
if n == 0 {
return UnsupportedError("kern nTables: 0")
}
// TODO: support multiple subtables. In practice, almost all .ttf files
// have only one subtable, if they have a kern table at all. But it's not
// impossible. Xolonium Regular (https://fontlibrary.org/en/font/xolonium)
// has 3 subtables. Those subtables appear to be disjoint, rather than
// being the same kerning pairs encoded in three different ways.
//
// For now, we'll use only the first subtable.
offset += 2 // Skip the version.
length, offset := int(u16(f.kern, offset)), offset+2
coverage, offset := u16(f.kern, offset), offset+2
if coverage != 0x0001 {
// We only support horizontal kerning.
return UnsupportedError(fmt.Sprintf("kern coverage: 0x%04x", coverage))
}
f.nKern, offset = int(u16(f.kern, offset)), offset+2
if 6*f.nKern != length-14 {
return FormatError("bad kern table length")
}
return nil
}
func (f *Font) parseMaxp() error {
if len(f.maxp) != 32 {
return FormatError(fmt.Sprintf("bad maxp length: %d", len(f.maxp)))
}
f.nGlyph = int(u16(f.maxp, 4))
f.maxTwilightPoints = u16(f.maxp, 16)
f.maxStorage = u16(f.maxp, 18)
f.maxFunctionDefs = u16(f.maxp, 20)
f.maxStackElements = u16(f.maxp, 24)
return nil
}
// scale returns x divided by f.fUnitsPerEm, rounded to the nearest integer.
func (f *Font) scale(x fixed.Int26_6) fixed.Int26_6 {
if x >= 0 {
x += fixed.Int26_6(f.fUnitsPerEm) / 2
} else {
x -= fixed.Int26_6(f.fUnitsPerEm) / 2
}
return x / fixed.Int26_6(f.fUnitsPerEm)
}
// Bounds returns the union of a Font's glyphs' bounds.
func (f *Font) Bounds(scale fixed.Int26_6) fixed.Rectangle26_6 {
b := f.bounds
b.Min.X = f.scale(scale * b.Min.X)
b.Min.Y = f.scale(scale * b.Min.Y)
b.Max.X = f.scale(scale * b.Max.X)
b.Max.Y = f.scale(scale * b.Max.Y)
return b
}
// FUnitsPerEm returns the number of FUnits in a Font's em-square's side.
func (f *Font) FUnitsPerEm() int32 {
return f.fUnitsPerEm
}
// Index returns a Font's index for the given rune.
func (f *Font) Index(x rune) Index {
c := uint32(x)
for i, j := 0, len(f.cm); i < j; {
h := i + (j-i)/2
cm := &f.cm[h]
if c < cm.start {
j = h
} else if cm.end < c {
i = h + 1
} else if cm.offset == 0 {
return Index(c + cm.delta)
} else {
offset := int(cm.offset) + 2*(h-len(f.cm)+int(c-cm.start))
return Index(u16(f.cmapIndexes, offset))
}
}
return 0
}
// Name returns the Font's name value for the given NameID. It returns "" if
// there was an error, or if that name was not found.
func (f *Font) Name(id NameID) string {
x, platformID, err := parseSubtables(f.name, "name", 6, 12, func(b []byte) bool {
return NameID(u16(b, 6)) == id
})
if err != nil {
return ""
}
offset, length := u16(f.name, 4)+u16(f.name, x+10), u16(f.name, x+8)
// Return the ASCII value of the encoded string.
// The string is encoded as UTF-16 on non-Apple platformIDs; Apple is platformID 1.
src := f.name[offset : offset+length]
var dst []byte
if platformID != 1 { // UTF-16.
if len(src)&1 != 0 {
return ""
}
dst = make([]byte, len(src)/2)
for i := range dst {
dst[i] = printable(u16(src, 2*i))
}
} else { // ASCII.
dst = make([]byte, len(src))
for i, c := range src {
dst[i] = printable(uint16(c))
}
}
return string(dst)
}
func printable(r uint16) byte {
if 0x20 <= r && r < 0x7f {
return byte(r)
}
return '?'
}
// unscaledHMetric returns the unscaled horizontal metrics for the glyph with
// the given index.
func (f *Font) unscaledHMetric(i Index) (h HMetric) {
j := int(i)
if j < 0 || f.nGlyph <= j {
return HMetric{}
}
if j >= f.nHMetric {
p := 4 * (f.nHMetric - 1)
return HMetric{
AdvanceWidth: fixed.Int26_6(u16(f.hmtx, p)),
LeftSideBearing: fixed.Int26_6(int16(u16(f.hmtx, p+2*(j-f.nHMetric)+4))),
}
}
return HMetric{
AdvanceWidth: fixed.Int26_6(u16(f.hmtx, 4*j)),
LeftSideBearing: fixed.Int26_6(int16(u16(f.hmtx, 4*j+2))),
}
}
// HMetric returns the horizontal metrics for the glyph with the given index.
func (f *Font) HMetric(scale fixed.Int26_6, i Index) HMetric {
h := f.unscaledHMetric(i)
h.AdvanceWidth = f.scale(scale * h.AdvanceWidth)
h.LeftSideBearing = f.scale(scale * h.LeftSideBearing)
return h
}
// unscaledVMetric returns the unscaled vertical metrics for the glyph with
// the given index. yMax is the top of the glyph's bounding box.
func (f *Font) unscaledVMetric(i Index, yMax fixed.Int26_6) (v VMetric) {
j := int(i)
if j < 0 || f.nGlyph <= j {
return VMetric{}
}
if 4*j+4 <= len(f.vmtx) {
return VMetric{
AdvanceHeight: fixed.Int26_6(u16(f.vmtx, 4*j)),
TopSideBearing: fixed.Int26_6(int16(u16(f.vmtx, 4*j+2))),
}
}
// The OS/2 table has grown over time.
// https://developer.apple.com/fonts/TTRefMan/RM06/Chap6OS2.html
// says that it was originally 68 bytes. Optional fields, including
// the ascender and descender, are described at
// http://www.microsoft.com/typography/otspec/os2.htm
if len(f.os2) >= 72 {
sTypoAscender := fixed.Int26_6(int16(u16(f.os2, 68)))
sTypoDescender := fixed.Int26_6(int16(u16(f.os2, 70)))
return VMetric{
AdvanceHeight: sTypoAscender - sTypoDescender,
TopSideBearing: sTypoAscender - yMax,
}
}
return VMetric{
AdvanceHeight: fixed.Int26_6(f.fUnitsPerEm),
TopSideBearing: 0,
}
}
// VMetric returns the vertical metrics for the glyph with the given index.
func (f *Font) VMetric(scale fixed.Int26_6, i Index) VMetric {
// TODO: should 0 be bounds.YMax?
v := f.unscaledVMetric(i, 0)
v.AdvanceHeight = f.scale(scale * v.AdvanceHeight)
v.TopSideBearing = f.scale(scale * v.TopSideBearing)
return v
}
// Kern returns the horizontal adjustment for the given glyph pair. A positive
// kern means to move the glyphs further apart.
func (f *Font) Kern(scale fixed.Int26_6, i0, i1 Index) fixed.Int26_6 {
if f.nKern == 0 {
return 0
}
g := uint32(i0)<<16 | uint32(i1)
lo, hi := 0, f.nKern
for lo < hi {
i := (lo + hi) / 2
ig := u32(f.kern, 18+6*i)
if ig < g {
lo = i + 1
} else if ig > g {
hi = i
} else {
return f.scale(scale * fixed.Int26_6(int16(u16(f.kern, 22+6*i))))
}
}
return 0
}
// Parse returns a new Font for the given TTF or TTC data.
//
// For TrueType Collections, the first font in the collection is parsed.
func Parse(ttf []byte) (font *Font, err error) {
return parse(ttf, 0)
}
func parse(ttf []byte, offset int) (font *Font, err error) {
if len(ttf)-offset < 12 {
err = FormatError("TTF data is too short")
return
}
originalOffset := offset
magic, offset := u32(ttf, offset), offset+4
switch magic {
case 0x00010000:
// No-op.
case 0x74746366: // "ttcf" as a big-endian uint32.
if originalOffset != 0 {
err = FormatError("recursive TTC")
return
}
ttcVersion, offset := u32(ttf, offset), offset+4
if ttcVersion != 0x00010000 && ttcVersion != 0x00020000 {
err = FormatError("bad TTC version")
return
}
numFonts, offset := int(u32(ttf, offset)), offset+4
if numFonts <= 0 {
err = FormatError("bad number of TTC fonts")
return
}
if len(ttf[offset:])/4 < numFonts {
err = FormatError("TTC offset table is too short")
return
}
// TODO: provide an API to select which font in a TrueType collection to return,
// not just the first one. This may require an API to parse a TTC's name tables,
// so users of this package can select the font in a TTC by name.
offset = int(u32(ttf, offset))
if offset <= 0 || offset > len(ttf) {
err = FormatError("bad TTC offset")
return
}
return parse(ttf, offset)
default:
err = FormatError("bad TTF version")
return
}
n, offset := int(u16(ttf, offset)), offset+2
offset += 6 // Skip the searchRange, entrySelector and rangeShift.
if len(ttf) < 16*n+offset {
err = FormatError("TTF data is too short")
return
}
f := new(Font)
// Assign the table slices.
for i := 0; i < n; i++ {
x := 16*i + offset
switch string(ttf[x : x+4]) {
case "cmap":
f.cmap, err = readTable(ttf, ttf[x+8:x+16])
case "cvt ":
f.cvt, err = readTable(ttf, ttf[x+8:x+16])
case "fpgm":
f.fpgm, err = readTable(ttf, ttf[x+8:x+16])
case "glyf":
f.glyf, err = readTable(ttf, ttf[x+8:x+16])
case "hdmx":
f.hdmx, err = readTable(ttf, ttf[x+8:x+16])
case "head":
f.head, err = readTable(ttf, ttf[x+8:x+16])
case "hhea":
f.hhea, err = readTable(ttf, ttf[x+8:x+16])
case "hmtx":
f.hmtx, err = readTable(ttf, ttf[x+8:x+16])
case "kern":
f.kern, err = readTable(ttf, ttf[x+8:x+16])
case "loca":
f.loca, err = readTable(ttf, ttf[x+8:x+16])
case "maxp":
f.maxp, err = readTable(ttf, ttf[x+8:x+16])
case "name":
f.name, err = readTable(ttf, ttf[x+8:x+16])
case "OS/2":
f.os2, err = readTable(ttf, ttf[x+8:x+16])
case "prep":
f.prep, err = readTable(ttf, ttf[x+8:x+16])
case "vmtx":
f.vmtx, err = readTable(ttf, ttf[x+8:x+16])
}
if err != nil {
return
}
}
// Parse and sanity-check the TTF data.
if err = f.parseHead(); err != nil {
return
}
if err = f.parseMaxp(); err != nil {
return
}
if err = f.parseCmap(); err != nil {
return
}
if err = f.parseKern(); err != nil {
return
}
if err = f.parseHhea(); err != nil {
return
}
font = f
return
}

View File

@ -0,0 +1,400 @@
// Copyright 2012 The Freetype-Go Authors. All rights reserved.
// Use of this source code is governed by your choice of either the
// FreeType License or the GNU General Public License version 2 (or
// any later version), both of which can be found in the LICENSE file.
package truetype
import (
"bufio"
"fmt"
"io"
"io/ioutil"
"os"
"strconv"
"strings"
"testing"
"golang.org/x/image/font"
"golang.org/x/image/math/fixed"
)
func parseTestdataFont(name string) (f *Font, testdataIsOptional bool, err error) {
b, err := ioutil.ReadFile(fmt.Sprintf("../testdata/%s.ttf", name))
if err != nil {
// The "x-foo" fonts are optional tests, as they are not checked
// in for copyright or file size reasons.
return nil, strings.HasPrefix(name, "x-"), fmt.Errorf("%s: ReadFile: %v", name, err)
}
f, err = Parse(b)
if err != nil {
return nil, true, fmt.Errorf("%s: Parse: %v", name, err)
}
return f, false, nil
}
func mkBounds(minX, minY, maxX, maxY fixed.Int26_6) fixed.Rectangle26_6 {
return fixed.Rectangle26_6{
Min: fixed.Point26_6{
X: minX,
Y: minY,
},
Max: fixed.Point26_6{
X: maxX,
Y: maxY,
},
}
}
// TestParse tests that the luxisr.ttf metrics and glyphs are parsed correctly.
// The numerical values can be manually verified by examining luxisr.ttx.
func TestParse(t *testing.T) {
f, _, err := parseTestdataFont("luxisr")
if err != nil {
t.Fatal(err)
}
if got, want := f.FUnitsPerEm(), int32(2048); got != want {
t.Errorf("FUnitsPerEm: got %v, want %v", got, want)
}
fupe := fixed.Int26_6(f.FUnitsPerEm())
if got, want := f.Bounds(fupe), mkBounds(-441, -432, 2024, 2033); got != want {
t.Errorf("Bounds: got %v, want %v", got, want)
}
i0 := f.Index('A')
i1 := f.Index('V')
if i0 != 36 || i1 != 57 {
t.Fatalf("Index: i0, i1 = %d, %d, want 36, 57", i0, i1)
}
if got, want := f.HMetric(fupe, i0), (HMetric{1366, 19}); got != want {
t.Errorf("HMetric: got %v, want %v", got, want)
}
if got, want := f.VMetric(fupe, i0), (VMetric{2465, 553}); got != want {
t.Errorf("VMetric: got %v, want %v", got, want)
}
if got, want := f.Kern(fupe, i0, i1), fixed.Int26_6(-144); got != want {
t.Errorf("Kern: got %v, want %v", got, want)
}
g := &GlyphBuf{}
err = g.Load(f, fupe, i0, font.HintingNone)
if err != nil {
t.Fatalf("Load: %v", err)
}
g0 := &GlyphBuf{
Bounds: g.Bounds,
Points: g.Points,
Ends: g.Ends,
}
g1 := &GlyphBuf{
Bounds: mkBounds(19, 0, 1342, 1480),
Points: []Point{
{19, 0, 51},
{581, 1480, 1},
{789, 1480, 51},
{1342, 0, 1},
{1116, 0, 35},
{962, 410, 3},
{368, 410, 33},
{214, 0, 3},
{428, 566, 19},
{904, 566, 33},
{667, 1200, 3},
},
Ends: []int{8, 11},
}
if got, want := fmt.Sprint(g0), fmt.Sprint(g1); got != want {
t.Errorf("GlyphBuf:\ngot %v\nwant %v", got, want)
}
}
func TestIndex(t *testing.T) {
testCases := map[string]map[rune]Index{
"luxisr": {
' ': 3,
'!': 4,
'A': 36,
'V': 57,
'É': 101,
'fl': 193,
'\u22c5': 385,
'中': 0,
},
// The x-etc test cases use those versions of the .ttf files provided
// by Ubuntu 14.04. See testdata/make-other-hinting-txts.sh for details.
"x-arial-bold": {
' ': 3,
'+': 14,
'0': 19,
'_': 66,
'w': 90,
'~': 97,
'Ä': 98,
'fl': 192,
'½': 242,
'σ': 305,
'λ': 540,
'ỹ': 1275,
'\u04e9': 1319,
'中': 0,
},
"x-deja-vu-sans-oblique": {
' ': 3,
'*': 13,
'Œ': 276,
'ω': 861,
'‡': 2571,
'⊕': 3110,
'fl': 4728,
'\ufb03': 4729,
'\ufffd': 4813,
// TODO: '\U0001f640': ???,
'中': 0,
},
"x-droid-sans-japanese": {
' ': 0,
'\u3000': 3,
'\u3041': 25,
'\u30fe': 201,
'\uff61': 202,
'\uff67': 208,
'\uff9e': 263,
'\uff9f': 264,
'\u4e00': 265,
'\u557e': 1000,
'\u61b6': 2024,
'\u6ede': 3177,
'\u7505': 3555,
'\u81e3': 4602,
'\u81e5': 4603,
'\u81e7': 4604,
'\u81e8': 4605,
'\u81ea': 4606,
'\u81ed': 4607,
'\u81f3': 4608,
'\u81f4': 4609,
'\u91c7': 5796,
'\u9fa0': 6620,
'\u203e': 12584,
},
"x-times-new-roman": {
' ': 3,
':': 29,
'fl': 192,
'Ŀ': 273,
'♠': 388,
'Ŗ': 451,
'Σ': 520,
'\u200D': 745,
'Ẽ': 1216,
'\u04e9': 1319,
'中': 0,
},
}
for name, wants := range testCases {
f, testdataIsOptional, err := parseTestdataFont(name)
if err != nil {
if testdataIsOptional {
t.Log(err)
} else {
t.Fatal(err)
}
continue
}
for r, want := range wants {
if got := f.Index(r); got != want {
t.Errorf("%s: Index of %q, aka %U: got %d, want %d", name, r, r, got, want)
}
}
}
}
func TestName(t *testing.T) {
testCases := map[string]string{
"luximr": "Luxi Mono",
"luxirr": "Luxi Serif",
"luxisr": "Luxi Sans",
}
for name, want := range testCases {
f, testdataIsOptional, err := parseTestdataFont(name)
if err != nil {
if testdataIsOptional {
t.Log(err)
} else {
t.Fatal(err)
}
continue
}
if got := f.Name(NameIDFontFamily); got != want {
t.Errorf("%s: got %q, want %q", name, got, want)
}
}
}
type scalingTestData struct {
advanceWidth fixed.Int26_6
bounds fixed.Rectangle26_6
points []Point
}
// scalingTestParse parses a line of points like
// 213 -22 -111 236 555;-22 -111 1, 178 555 1, 236 555 1, 36 -111 1
// The line will not have a trailing "\n".
func scalingTestParse(line string) (ret scalingTestData) {
next := func(s string) (string, fixed.Int26_6) {
t, i := "", strings.Index(s, " ")
if i != -1 {
s, t = s[:i], s[i+1:]
}
x, _ := strconv.Atoi(s)
return t, fixed.Int26_6(x)
}
i := strings.Index(line, ";")
prefix, line := line[:i], line[i+1:]
prefix, ret.advanceWidth = next(prefix)
prefix, ret.bounds.Min.X = next(prefix)
prefix, ret.bounds.Min.Y = next(prefix)
prefix, ret.bounds.Max.X = next(prefix)
prefix, ret.bounds.Max.Y = next(prefix)
ret.points = make([]Point, 0, 1+strings.Count(line, ","))
for len(line) > 0 {
s := line
if i := strings.Index(line, ","); i != -1 {
s, line = line[:i], line[i+1:]
for len(line) > 0 && line[0] == ' ' {
line = line[1:]
}
} else {
line = ""
}
s, x := next(s)
s, y := next(s)
s, f := next(s)
ret.points = append(ret.points, Point{X: x, Y: y, Flags: uint32(f)})
}
return ret
}
// scalingTestEquals is equivalent to, but faster than, calling
// reflect.DeepEqual(a, b), and also returns the index of the first non-equal
// element. It also treats a nil []Point and an empty non-nil []Point as equal.
// a and b must have equal length.
func scalingTestEquals(a, b []Point) (index int, equals bool) {
for i, p := range a {
if p != b[i] {
return i, false
}
}
return 0, true
}
var scalingTestCases = []struct {
name string
size int
}{
{"luxisr", 12},
{"x-arial-bold", 11},
{"x-deja-vu-sans-oblique", 17},
{"x-droid-sans-japanese", 9},
{"x-times-new-roman", 13},
}
func testScaling(t *testing.T, h font.Hinting) {
for _, tc := range scalingTestCases {
f, testdataIsOptional, err := parseTestdataFont(tc.name)
if err != nil {
if testdataIsOptional {
t.Log(err)
} else {
t.Error(err)
}
continue
}
hintingStr := "sans"
if h != font.HintingNone {
hintingStr = "with"
}
testFile, err := os.Open(fmt.Sprintf(
"../testdata/%s-%dpt-%s-hinting.txt", tc.name, tc.size, hintingStr))
if err != nil {
t.Errorf("%s: Open: %v", tc.name, err)
continue
}
defer testFile.Close()
wants := []scalingTestData{}
scanner := bufio.NewScanner(testFile)
if scanner.Scan() {
major, minor, patch := 0, 0, 0
_, err := fmt.Sscanf(scanner.Text(), "freetype version %d.%d.%d", &major, &minor, &patch)
if err != nil {
t.Errorf("%s: version information: %v", tc.name, err)
}
if (major < 2) || (major == 2 && minor < 5) || (major == 2 && minor == 5 && patch < 1) {
t.Errorf("%s: need freetype version >= 2.5.1.\n"+
"Try setting LD_LIBRARY_PATH=/path/to/freetype_built_from_src/objs/.libs/\n"+
"and re-running testdata/make-other-hinting-txts.sh",
tc.name)
continue
}
} else {
t.Errorf("%s: no version information", tc.name)
continue
}
for scanner.Scan() {
wants = append(wants, scalingTestParse(scanner.Text()))
}
if err := scanner.Err(); err != nil && err != io.EOF {
t.Errorf("%s: Scanner: %v", tc.name, err)
continue
}
glyphBuf := &GlyphBuf{}
for i, want := range wants {
if err = glyphBuf.Load(f, fixed.I(tc.size), Index(i), h); err != nil {
t.Errorf("%s: glyph #%d: Load: %v", tc.name, i, err)
continue
}
got := scalingTestData{
advanceWidth: glyphBuf.AdvanceWidth,
bounds: glyphBuf.Bounds,
points: glyphBuf.Points,
}
if got.advanceWidth != want.advanceWidth {
t.Errorf("%s: glyph #%d advance width:\ngot %v\nwant %v",
tc.name, i, got.advanceWidth, want.advanceWidth)
continue
}
if got.bounds != want.bounds {
t.Errorf("%s: glyph #%d bounds:\ngot %v\nwant %v",
tc.name, i, got.bounds, want.bounds)
continue
}
for i := range got.points {
got.points[i].Flags &= 0x01
}
if len(got.points) != len(want.points) {
t.Errorf("%s: glyph #%d:\ngot %v\nwant %v\ndifferent slice lengths: %d versus %d",
tc.name, i, got.points, want.points, len(got.points), len(want.points))
continue
}
if j, equals := scalingTestEquals(got.points, want.points); !equals {
t.Errorf("%s: glyph #%d:\ngot %v\nwant %v\nat index %d: %v versus %v",
tc.name, i, got.points, want.points, j, got.points[j], want.points[j])
continue
}
}
}
}
func TestScalingHintingNone(t *testing.T) { testScaling(t, font.HintingNone) }
func TestScalingHintingFull(t *testing.T) { testScaling(t, font.HintingFull) }

1
vendor/github.com/golang/groupcache/.gitignore generated vendored Normal file
View File

@ -0,0 +1 @@
*~

191
vendor/github.com/golang/groupcache/LICENSE generated vendored Normal file
View File

@ -0,0 +1,191 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and
distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright
owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities
that control, are controlled by, or are under common control with that entity.
For the purposes of this definition, "control" means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by
contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising
permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including
but not limited to software source code, documentation source, and configuration
files.
"Object" form shall mean any form resulting from mechanical transformation or
translation of a Source form, including but not limited to compiled object code,
generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made
available under the License, as indicated by a copyright notice that is included
in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that
is based on (or derived from) the Work and for which the editorial revisions,
annotations, elaborations, or other modifications represent, as a whole, an
original work of authorship. For the purposes of this License, Derivative Works
shall not include works that remain separable from, or merely link (or bind by
name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version
of the Work and any modifications or additions to that Work or Derivative Works
thereof, that is intentionally submitted to Licensor for inclusion in the Work
by the copyright owner or by an individual or Legal Entity authorized to submit
on behalf of the copyright owner. For the purposes of this definition,
"submitted" means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems, and
issue tracking systems that are managed by, or on behalf of, the Licensor for
the purpose of discussing and improving the Work, but excluding communication
that is conspicuously marked or otherwise designated in writing by the copyright
owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf
of whom a Contribution has been received by Licensor and subsequently
incorporated within the Work.
2. Grant of Copyright License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the Work and such
Derivative Works in Source or Object form.
3. Grant of Patent License.
Subject to the terms and conditions of this License, each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free,
irrevocable (except as stated in this section) patent license to make, have
made, use, offer to sell, sell, import, and otherwise transfer the Work, where
such license applies only to those patent claims licensable by such Contributor
that are necessarily infringed by their Contribution(s) alone or by combination
of their Contribution(s) with the Work to which such Contribution(s) was
submitted. If You institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work or a
Contribution incorporated within the Work constitutes direct or contributory
patent infringement, then any patent licenses granted to You under this License
for that Work shall terminate as of the date such litigation is filed.
4. Redistribution.
You may reproduce and distribute copies of the Work or Derivative Works thereof
in any medium, with or without modifications, and in Source or Object form,
provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of
this License; and
You must cause any modified files to carry prominent notices stating that You
changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute,
all copyright, patent, trademark, and attribution notices from the Source form
of the Work, excluding those notices that do not pertain to any part of the
Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any
Derivative Works that You distribute must include a readable copy of the
attribution notices contained within such NOTICE file, excluding those notices
that do not pertain to any part of the Derivative Works, in at least one of the
following places: within a NOTICE text file distributed as part of the
Derivative Works; within the Source form or documentation, if provided along
with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of
the NOTICE file are for informational purposes only and do not modify the
License. You may add Your own attribution notices within Derivative Works that
You distribute, alongside or as an addendum to the NOTICE text from the Work,
provided that such additional attribution notices cannot be construed as
modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or
distribution of Your modifications, or for any such Derivative Works as a whole,
provided Your use, reproduction, and distribution of the Work otherwise complies
with the conditions stated in this License.
5. Submission of Contributions.
Unless You explicitly state otherwise, any Contribution intentionally submitted
for inclusion in the Work by You to the Licensor shall be under the terms and
conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of
any separate license agreement you may have executed with Licensor regarding
such Contributions.
6. Trademarks.
This License does not grant permission to use the trade names, trademarks,
service marks, or product names of the Licensor, except as required for
reasonable and customary use in describing the origin of the Work and
reproducing the content of the NOTICE file.
7. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the
Work (and each Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,
including, without limitation, any warranties or conditions of TITLE,
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are
solely responsible for determining the appropriateness of using or
redistributing the Work and assume any risks associated with Your exercise of
permissions under this License.
8. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),
contract, or otherwise, unless required by applicable law (such as deliberate
and grossly negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special, incidental,
or consequential damages of any character arising as a result of this License or
out of the use or inability to use the Work (including but not limited to
damages for loss of goodwill, work stoppage, computer failure or malfunction, or
any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to
offer, and charge a fee for, acceptance of support, warranty, indemnity, or
other liability obligations and/or rights consistent with this License. However,
in accepting such obligations, You may act only on Your own behalf and on Your
sole responsibility, not on behalf of any other Contributor, and only if You
agree to indemnify, defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason of your
accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work
To apply the Apache License to your work, attach the following boilerplate
notice, with the fields enclosed by brackets "[]" replaced with your own
identifying information. (Don't include the brackets!) The text should be
enclosed in the appropriate comment syntax for the file format. We also
recommend that a file or class name and description of purpose be included on
the same "printed page" as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

73
vendor/github.com/golang/groupcache/README.md generated vendored Normal file
View File

@ -0,0 +1,73 @@
# groupcache
## Summary
groupcache is a caching and cache-filling library, intended as a
replacement for memcached in many cases.
For API docs and examples, see http://godoc.org/github.com/golang/groupcache
## Comparison to memcached
### **Like memcached**, groupcache:
* shards by key to select which peer is responsible for that key
### **Unlike memcached**, groupcache:
* does not require running a separate set of servers, thus massively
reducing deployment/configuration pain. groupcache is a client
library as well as a server. It connects to its own peers.
* comes with a cache filling mechanism. Whereas memcached just says
"Sorry, cache miss", often resulting in a thundering herd of
database (or whatever) loads from an unbounded number of clients
(which has resulted in several fun outages), groupcache coordinates
cache fills such that only one load in one process of an entire
replicated set of processes populates the cache, then multiplexes
the loaded value to all callers.
* does not support versioned values. If key "foo" is value "bar",
key "foo" must always be "bar". There are neither cache expiration
times, nor explicit cache evictions. Thus there is also no CAS,
nor Increment/Decrement. This also means that groupcache....
* ... supports automatic mirroring of super-hot items to multiple
processes. This prevents memcached hot spotting where a machine's
CPU and/or NIC are overloaded by very popular keys/values.
* is currently only available for Go. It's very unlikely that I
(bradfitz@) will port the code to any other language.
## Loading process
In a nutshell, a groupcache lookup of **Get("foo")** looks like:
(On machine #5 of a set of N machines running the same code)
1. Is the value of "foo" in local memory because it's super hot? If so, use it.
2. Is the value of "foo" in local memory because peer #5 (the current
peer) is the owner of it? If so, use it.
3. Amongst all the peers in my set of N, am I the owner of the key
"foo"? (e.g. does it consistent hash to 5?) If so, load it. If
other callers come in, via the same process or via RPC requests
from peers, they block waiting for the load to finish and get the
same answer. If not, RPC to the peer that's the owner and get
the answer. If the RPC fails, just load it locally (still with
local dup suppression).
## Users
groupcache is in production use by dl.google.com (its original user),
parts of Blogger, parts of Google Code, parts of Google Fiber, parts
of Google production monitoring systems, etc.
## Presentations
See http://talks.golang.org/2013/oscon-dl.slide
## Help
Use the golang-nuts mailing list for any discussion or questions.

175
vendor/github.com/golang/groupcache/byteview.go generated vendored Normal file
View File

@ -0,0 +1,175 @@
/*
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package groupcache
import (
"bytes"
"errors"
"io"
"strings"
)
// A ByteView holds an immutable view of bytes.
// Internally it wraps either a []byte or a string,
// but that detail is invisible to callers.
//
// A ByteView is meant to be used as a value type, not
// a pointer (like a time.Time).
type ByteView struct {
// If b is non-nil, b is used, else s is used.
b []byte
s string
}
// Len returns the view's length.
func (v ByteView) Len() int {
if v.b != nil {
return len(v.b)
}
return len(v.s)
}
// ByteSlice returns a copy of the data as a byte slice.
func (v ByteView) ByteSlice() []byte {
if v.b != nil {
return cloneBytes(v.b)
}
return []byte(v.s)
}
// String returns the data as a string, making a copy if necessary.
func (v ByteView) String() string {
if v.b != nil {
return string(v.b)
}
return v.s
}
// At returns the byte at index i.
func (v ByteView) At(i int) byte {
if v.b != nil {
return v.b[i]
}
return v.s[i]
}
// Slice slices the view between the provided from and to indices.
func (v ByteView) Slice(from, to int) ByteView {
if v.b != nil {
return ByteView{b: v.b[from:to]}
}
return ByteView{s: v.s[from:to]}
}
// SliceFrom slices the view from the provided index until the end.
func (v ByteView) SliceFrom(from int) ByteView {
if v.b != nil {
return ByteView{b: v.b[from:]}
}
return ByteView{s: v.s[from:]}
}
// Copy copies b into dest and returns the number of bytes copied.
func (v ByteView) Copy(dest []byte) int {
if v.b != nil {
return copy(dest, v.b)
}
return copy(dest, v.s)
}
// Equal returns whether the bytes in b are the same as the bytes in
// b2.
func (v ByteView) Equal(b2 ByteView) bool {
if b2.b == nil {
return v.EqualString(b2.s)
}
return v.EqualBytes(b2.b)
}
// EqualString returns whether the bytes in b are the same as the bytes
// in s.
func (v ByteView) EqualString(s string) bool {
if v.b == nil {
return v.s == s
}
l := v.Len()
if len(s) != l {
return false
}
for i, bi := range v.b {
if bi != s[i] {
return false
}
}
return true
}
// EqualBytes returns whether the bytes in b are the same as the bytes
// in b2.
func (v ByteView) EqualBytes(b2 []byte) bool {
if v.b != nil {
return bytes.Equal(v.b, b2)
}
l := v.Len()
if len(b2) != l {
return false
}
for i, bi := range b2 {
if bi != v.s[i] {
return false
}
}
return true
}
// Reader returns an io.ReadSeeker for the bytes in v.
func (v ByteView) Reader() io.ReadSeeker {
if v.b != nil {
return bytes.NewReader(v.b)
}
return strings.NewReader(v.s)
}
// ReadAt implements io.ReaderAt on the bytes in v.
func (v ByteView) ReadAt(p []byte, off int64) (n int, err error) {
if off < 0 {
return 0, errors.New("view: invalid offset")
}
if off >= int64(v.Len()) {
return 0, io.EOF
}
n = v.SliceFrom(int(off)).Copy(p)
if n < len(p) {
err = io.EOF
}
return
}
// WriteTo implements io.WriterTo on the bytes in v.
func (v ByteView) WriteTo(w io.Writer) (n int64, err error) {
var m int
if v.b != nil {
m, err = w.Write(v.b)
} else {
m, err = io.WriteString(w, v.s)
}
if err == nil && m < v.Len() {
err = io.ErrShortWrite
}
n = int64(m)
return
}

147
vendor/github.com/golang/groupcache/byteview_test.go generated vendored Normal file
View File

@ -0,0 +1,147 @@
/*
Copyright 2012 Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package groupcache
import (
"bytes"
"fmt"
"io"
"io/ioutil"
"testing"
)
func TestByteView(t *testing.T) {
for _, s := range []string{"", "x", "yy"} {
for _, v := range []ByteView{of([]byte(s)), of(s)} {
name := fmt.Sprintf("string %q, view %+v", s, v)
if v.Len() != len(s) {
t.Errorf("%s: Len = %d; want %d", name, v.Len(), len(s))
}
if v.String() != s {
t.Errorf("%s: String = %q; want %q", name, v.String(), s)
}
var longDest [3]byte
if n := v.Copy(longDest[:]); n != len(s) {
t.Errorf("%s: long Copy = %d; want %d", name, n, len(s))
}
var shortDest [1]byte
if n := v.Copy(shortDest[:]); n != min(len(s), 1) {
t.Errorf("%s: short Copy = %d; want %d", name, n, min(len(s), 1))
}
if got, err := ioutil.ReadAll(v.Reader()); err != nil || string(got) != s {
t.Errorf("%s: Reader = %q, %v; want %q", name, got, err, s)
}
if got, err := ioutil.ReadAll(io.NewSectionReader(v, 0, int64(len(s)))); err != nil || string(got) != s {
t.Errorf("%s: SectionReader of ReaderAt = %q, %v; want %q", name, got, err, s)
}
var dest bytes.Buffer
if _, err := v.WriteTo(&dest); err != nil || !bytes.Equal(dest.Bytes(), []byte(s)) {
t.Errorf("%s: WriteTo = %q, %v; want %q", name, dest.Bytes(), err, s)
}
}
}
}
// of returns a byte view of the []byte or string in x.
func of(x interface{}) ByteView {
if bytes, ok := x.([]byte); ok {
return ByteView{b: bytes}
}
return ByteView{s: x.(string)}
}
func TestByteViewEqual(t *testing.T) {
tests := []struct {
a interface{} // string or []byte
b interface{} // string or []byte
want bool
}{
{"x", "x", true},
{"x", "y", false},
{"x", "yy", false},
{[]byte("x"), []byte("x"), true},
{[]byte("x"), []byte("y"), false},
{[]byte("x"), []byte("yy"), false},
{[]byte("x"), "x", true},
{[]byte("x"), "y", false},
{[]byte("x"), "yy", false},
{"x", []byte("x"), true},
{"x", []byte("y"), false},
{"x", []byte("yy"), false},
}
for i, tt := range tests {
va := of(tt.a)
if bytes, ok := tt.b.([]byte); ok {
if got := va.EqualBytes(bytes); got != tt.want {
t.Errorf("%d. EqualBytes = %v; want %v", i, got, tt.want)
}
} else {
if got := va.EqualString(tt.b.(string)); got != tt.want {
t.Errorf("%d. EqualString = %v; want %v", i, got, tt.want)
}
}
if got := va.Equal(of(tt.b)); got != tt.want {
t.Errorf("%d. Equal = %v; want %v", i, got, tt.want)
}
}
}
func TestByteViewSlice(t *testing.T) {
tests := []struct {
in string
from int
to interface{} // nil to mean the end (SliceFrom); else int
want string
}{
{
in: "abc",
from: 1,
to: 2,
want: "b",
},
{
in: "abc",
from: 1,
want: "bc",
},
{
in: "abc",
to: 2,
want: "ab",
},
}
for i, tt := range tests {
for _, v := range []ByteView{of([]byte(tt.in)), of(tt.in)} {
name := fmt.Sprintf("test %d, view %+v", i, v)
if tt.to != nil {
v = v.Slice(tt.from, tt.to.(int))
} else {
v = v.SliceFrom(tt.from)
}
if v.String() != tt.want {
t.Errorf("%s: got %q; want %q", name, v.String(), tt.want)
}
}
}
}
func min(a, b int) int {
if a < b {
return a
}
return b
}

Some files were not shown because too many files have changed in this diff Show More