本文整理匯總了Golang中code/google/com/p/plotinum/plot.DrawArea.Max方法的典型用法代碼示例。如果您正苦於以下問題:Golang DrawArea.Max方法的具體用法?Golang DrawArea.Max怎麽用?Golang DrawArea.Max使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類code/google/com/p/plotinum/plot.DrawArea
的用法示例。
在下文中一共展示了DrawArea.Max方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Plot
func (pts *VerticalLine) Plot(da plot.DrawArea, plt *plot.Plot) {
trX, _ := plt.Transforms(&da)
ps := make([]plot.Point, 2)
ps[0].X = trX(pts.X)
ps[1].X = ps[0].X
ps[0].Y = da.Min.Y
ps[1].Y = da.Max().Y
da.StrokeLines(pts.LineStyle, da.ClipLinesXY(ps)...)
}
示例2: Plot
func (pts *HorizontalLine) Plot(da plot.DrawArea, plt *plot.Plot) {
_, trY := plt.Transforms(&da)
ps := make([]plot.Point, 2)
ps[0].X = da.Min.X
ps[1].X = da.Max().X
ps[0].Y = trY(pts.Y)
ps[1].Y = ps[0].Y
da.StrokeLines(pts.LineStyle, da.ClipLinesXY(ps)...)
}
示例3: Thumbnail
// Thumbnail the thumbnail for the Line,
// implementing the plot.Thumbnailer interface.
func (pts *Line) Thumbnail(da *plot.DrawArea) {
if pts.ShadeColor != nil {
points := []plot.Point{
{da.Min.X, da.Min.Y},
{da.Min.X, da.Max().Y},
{da.Max().X, da.Max().Y},
{da.Max().X, da.Min.Y},
}
poly := da.ClipPolygonY(points)
da.FillPolygon(*pts.ShadeColor, poly)
points = append(points, plot.Pt(da.Min.X, da.Min.Y))
} else {
y := da.Center().Y
da.StrokeLine2(pts.LineStyle, da.Min.X, y, da.Max().X, y)
}
}
示例4: Thumbnail
func (b *BarChart) Thumbnail(da *plot.DrawArea) {
pts := []plot.Point{
{da.Min.X, da.Min.Y},
{da.Min.X, da.Max().Y},
{da.Max().X, da.Max().Y},
{da.Max().X, da.Min.Y},
}
poly := da.ClipPolygonY(pts)
da.FillPolygon(b.Color, poly)
pts = append(pts, plot.Pt(da.Min.X, da.Min.Y))
outline := da.ClipLinesY(pts)
da.StrokeLines(b.LineStyle, outline...)
}
示例5: Thumbnail
// Thumbnail draws a line in the given style down the
// center of a DrawArea as a thumbnail representation
// of the LineStyle of the function.
func (f Function) Thumbnail(da *plot.DrawArea) {
y := da.Center().Y
da.StrokeLine2(f.LineStyle, da.Min.X, y, da.Max().X, y)
}
示例6: Thumbnail
func (l *LineThumbnailer) Thumbnail(da *plot.DrawArea) {
y := da.Center().Y
da.StrokeLine2(l.LineStyle, da.Min.X, y, da.Max().X, y)
}
示例7: Thumbnail
// Thumbnail the thumbnail for the Line,
// implementing the plot.Thumbnailer interface.
func (pts *Line) Thumbnail(da *plot.DrawArea) {
y := da.Center().Y
da.StrokeLine2(pts.LineStyle, da.Min.X, y, da.Max().X, y)
}