Skip to content

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
ajstarks committed Jan 9, 2016
1 parent 75c8c67 commit 1c91669
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions README.md
Expand Up @@ -60,15 +60,15 @@ WindowPosition moves the window to given position

### Setup and shutdown

void finish()
Shutdown the graphics. This should end every program.

void init(int *w, int *h)
Initialize the graphics: width and height of the canvas are returned. This should begin every program.

void initWindowSize(int x, int y, unsigned int w, unsigned int h)
Initialize with specific dimensions

void finish()
Shutdown the graphics. This should end every program.

void Start(int width, int height)
Begin the picture, clear the screen with a default white, set the stroke and fill to black.

Expand Down Expand Up @@ -122,10 +122,16 @@ Draw a line between (x1, y1) and (x2, y2).
void Rect(VGfloat x, VGfloat y, VGfloat w, VGfloat h)
Draw a rectangle with its origin (lower left) at (x,y), and size is (width,height).

void RectOutline(VGfloat x, VGfloat y, VGfloat w, VGfloat h)
Outlined version

void Roundrect(VGfloat x, VGfloat y, VGfloat w, VGfloat h, VGfloat rw, VGfloat rh)
Draw a rounded rectangle with its origin (lower left) at (x,y), and size is (width,height).
The width and height of the corners are specified with (rw,rh).

void RoundrectOutline(VGfloat x, VGfloat y, VGfloat w, VGfloat h, VGfloat rw, VGfloat rh)
Outlined version

void Polygon(VGfloat *x, VGfloat *y, VGint n)
Draw a polygon using the coordinates in arrays pointed to by x and y. The number of coordinates is n.

Expand All @@ -147,7 +153,7 @@ Outlined version
void Qbezier(VGfloat sx, VGfloat sy, VGfloat cx, VGfloat cy, VGfloat ex, VGfloat ey)
Draw a quadratic bezier curve beginning at (sx, sy), using control points at (cx, cy), ending at (ex, ey).

QbezierOutline(VGfloat sx, VGfloat sy, VGfloat cx, VGfloat cy, VGfloat ex, VGfloat ey)
void QbezierOutline(VGfloat sx, VGfloat sy, VGfloat cx, VGfloat cy, VGfloat ex, VGfloat ey)
Outlined version

void Cbezier(VGfloat sx, VGfloat sy, VGfloat cx, VGfloat cy, VGfloat px, VGfloat py, VGfloat ex, VGfloat ey)
Expand Down Expand Up @@ -298,6 +304,8 @@ The openvg shapes library can now be used in C code by including shapes.h and fo

A Go programming language wrapper for the library is found in openvg.go. Sample clients are in the directory go-client. The API closely follows the C API; here is the "hello, world" program in Go:

<a href="https://godoc.org/github.com/ajstarks/openvg">The Go API</a>

package main

import (
Expand Down

0 comments on commit 1c91669

Please sign in to comment.