本文整理汇总了Golang中github.com/platinasystems/weeb/r2.X类的典型用法代码示例。如果您正苦于以下问题:Golang X类的具体用法?Golang X怎么用?Golang X使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了X类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: StrokeText
func (c *Context) StrokeText(text string, x r2.X, maxWidth ...float64) {
if len(maxWidth) > 0 {
c.Call("strokeText", text, x.X(), x.Y(), maxWidth)
} else {
c.Call("strokeText", text, x.X(), x.Y())
}
}
示例2: findNearby
func (m *myElog) findNearby(tol float64, p r2.X) (es []*elog.Event) {
px := p.X() - m.margin.X()
dx := px / m.max.X()
pt := m.tb.Min + m.tb.Dt*dx
vw := &m.view
for ei := range vw.Events {
e := &vw.Events[ei]
dt := math.Abs(m.view.Time(e).Sub(m.tb.Start).Seconds() - pt)
if dt < .05*m.tb.Dt {
es = append(es, e)
}
}
return
}
示例3: ClearRect
func (c *Context) ClearRect(x, s r2.X) { c.Call("clearRect", x.X(), x.Y(), s.X(), s.Y()) }
示例4: ArcTo
func (c *Context) ArcTo(x1, x2 r2.X, r float64) { c.Call("arcTo", x1.X(), x1.Y(), x2.X(), x2.Y(), r) }
示例5: FillRect
func (c *Context) FillRect(x, s r2.X) { c.Call("fillRect", x.X(), x.Y(), s.X(), s.Y()) }
示例6: StrokeRect
func (c *Context) StrokeRect(x, s r2.X) { c.Call("strokeRect", x.X(), x.Y(), s.X(), s.Y()) }
示例7: SetTransform
// Resets transform to DX 0 and identity matrix then applies given transform.
func (c *Context) SetTransform(m00, m01, m10, m11 float64, dx r2.X) {
c.Call("setTransform", m00, m01, m10, m11, dx.X(), dx.Y())
}
示例8: IsPointInPath
func (c *Context) IsPointInPath(x r2.X) { c.Call("isPointInPath", x.X(), x.Y()) }
示例9: Scale
// Transforms
func (c *Context) Scale(x r2.X) { c.Call("scale", x.X(), x.Y()) }
示例10: Translate
func (c *Context) Translate(x r2.X) { c.Call("translate", x.X(), x.Y()) }
示例11: Ellipse
func (c *Context) Ellipse(x, r r2.X, θ0, θ1, rotation r2.Angle, ccw ...bool) {
c.Call("ellipse", x.X(), x.Y(), r.X(), r.Y(), rotation.Radians(), θ0.Radians(), θ1.Radians(), ccw)
}
示例12: MoveTo
func (c *Context) MoveTo(x r2.X) { c.Call("moveTo", x.X(), x.Y()) }
示例13: Arc
func (c *Context) Arc(x r2.X, r float64, θ0, θ1 r2.Angle, ccw ...bool) {
c.Call("arc", x.X(), x.Y(), r, θ0.Radians(), θ1.Radians(), ccw)
}
示例14: BezierCurveTo
func (c *Context) BezierCurveTo(c1, c2, x1 r2.X) {
c.Call("bezierCurveTo", c1.X(), c1.Y(), c2.X(), c2.Y(), x1.X(), x1.Y())
}
示例15: QuadraticCurveTo
func (c *Context) QuadraticCurveTo(c1, x1 r2.X) {
c.Call("quadraticCurveTo", c1.X(), c1.Y(), x1.X(), x1.Y())
}