本文整理匯總了Golang中github.com/mikeshimura/goreport.GoReport.Rect方法的典型用法代碼示例。如果您正苦於以下問題:Golang GoReport.Rect方法的具體用法?Golang GoReport.Rect怎麽用?Golang GoReport.Rect使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/mikeshimura/goreport.GoReport
的用法示例。
在下文中一共展示了GoReport.Rect方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Execute
func (h M1Header) Execute(report gr.GoReport) {
report.Font("IPAexG", 14, "")
report.LineType("straight", 8)
report.GrayStroke(0.9)
report.LineH(48, 13, 81)
report.GrayStroke(0)
report.LineType("straight", 0.5)
report.Rect(48, 13, 81, 21)
report.Cell(50, 15, "Sales Report")
report.Font("IPAexG", 12, "")
report.Cell(245, 20, "page")
report.CellRight(253, 20, 10, strconv.Itoa(report.Page))
report.Cell(264, 20, "of")
report.CellRight(268, 20, 10, "{#TotalPage#}")
y := 23.0
report.Cell(15, y, "D No")
report.Cell(30, y, "Dept")
report.Cell(60, y, "Order")
report.Cell(90, y, "Stock")
report.Cell(120, y, "Name")
report.CellRight(135, y, 25, "Unit Price")
report.CellRight(160, y, 20, "Qty")
report.CellRight(190, y, 20, "Amount")
report.LineType("straight", 0.2)
report.LineH(15, 28, 220)
report.Image("apple.jpg", 220, 10, 240, 30)
}
示例2: Execute
func (h C2G1Summary) Execute(report gr.GoReport) {
x := 25.0
y := 1.5
report.LineType("straight", 5)
report.GrayStroke(0.85)
report.LineH(x, 0, x+160)
report.LineType("straight", 0.3)
report.GrayStroke(0)
report.Rect(x, 0, x+160, 5)
report.Font("IPAexゴシック", 10, "")
report.CellRight(x+159, y, 0, "\u00A5"+gr.AddComma(
strconv.FormatFloat(report.SumWork["g1amtcum"], 'f', 0, 64)))
report.Cell(x+117, y, "伝票合計")
report.SumWork["g1amtcum"] = 0.0
report.SumWork["g1item"] = 0.0
}