本文整理汇总了Golang中github.com/gotk3/gotk3/cairo.Context.Stroke方法的典型用法代码示例。如果您正苦于以下问题:Golang Context.Stroke方法的具体用法?Golang Context.Stroke怎么用?Golang Context.Stroke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/gotk3/gotk3/cairo.Context
的用法示例。
在下文中一共展示了Context.Stroke方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: DrawSelector
// draw the piece on the canvas
func (self *MainWindow) DrawSelector(cr *cairo.Context, x, y float64) {
cr.SetSourceRGBA(0.2, 0.8, 0.2, 0.8)
cr.SetLineWidth(5)
cr.Rectangle(x*self.tileWidth, y*self.tileHeight, self.tileWidth, self.tileHeight)
cr.Stroke()
}
示例2: DrawAccLine
func DrawAccLine(gc *cairo.Context, x1, y1 float64, p2 image.Point) {
gc.MoveTo(x1, y1)
gc.LineTo(float64(p2.X), float64(p2.Y))
gc.Stroke()
}
示例3: DrawLine
func DrawLine(gc *cairo.Context, p1, p2 image.Point) {
gc.MoveTo(float64(p1.X), float64(p1.Y))
gc.LineTo(float64(p2.X), float64(p2.Y))
gc.Stroke()
}