mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 11:18:54 +01:00
doc: Improve comments
This commit is contained in:
parent
c62c195db3
commit
3cf5ca4df3
@ -29,7 +29,7 @@ import (
|
||||
// How to solve path depends on your environment. This varies on your desktop or web browser.
|
||||
// Note that this doesn't work on mobiles.
|
||||
//
|
||||
// Instead of using this function, it is safer to embed your resources, e.g., with github.com/jteeuwen/go-bindata .
|
||||
// For productions, instead of using this function, it is safer to embed your resources, e.g., with github.com/jteeuwen/go-bindata .
|
||||
func NewImageFromFile(path string, filter ebiten.Filter) (*ebiten.Image, image.Image, error) {
|
||||
file, err := OpenFile(path)
|
||||
if err != nil {
|
||||
|
@ -41,7 +41,7 @@ func colorScale(clr color.Color) (rf, gf, bf, af float64) {
|
||||
return
|
||||
}
|
||||
|
||||
// DrawLine draws a line on the given destination dst.
|
||||
// DrawLine draws a line segment on the given destination dst.
|
||||
//
|
||||
// DrawLine is intended to be used mainly for debugging or prototyping purpose.
|
||||
func DrawLine(dst *ebiten.Image, x1, y1, x2, y2 float64, clr color.Color) {
|
||||
|
@ -39,6 +39,8 @@ func Start(f func(*ebiten.Image) error, width, height int, scale float64, title
|
||||
// On Android, this should be called at onDrawFrame of Renderer (used by GLSurfaceView).
|
||||
//
|
||||
// On iOS, this should be called at glkView:drawInRect: of GLKViewDelegate.
|
||||
//
|
||||
// Update returns error when 1) OpenGL error happens, or 2) f in Start returns error samely as ebiten.Run.
|
||||
func Update() error {
|
||||
return update()
|
||||
}
|
||||
|
@ -15,6 +15,8 @@
|
||||
// Package text offers functions to draw texts on an Ebiten's image.
|
||||
//
|
||||
// Note: This package is experimental and API might be changed.
|
||||
//
|
||||
// For the example using a TTF font, see font package in the examples.
|
||||
package text
|
||||
|
||||
import (
|
||||
|
Loading…
Reference in New Issue
Block a user