{"id":16521905,"url":"https://github.com/ajstarks/fc","last_synced_at":"2025-07-06T17:38:26.500Z","repository":{"id":57518823,"uuid":"246761636","full_name":"ajstarks/fc","owner":"ajstarks","description":"High-level canvas for the fyne package","archived":false,"fork":false,"pushed_at":"2025-06-14T00:10:34.000Z","size":17430,"stargazers_count":73,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-14T01:21:14.058Z","etag":null,"topics":["canvas","fyne","go","golang","gui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajstarks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-12T06:38:26.000Z","updated_at":"2025-06-14T00:10:38.000Z","dependencies_parsed_at":"2024-02-29T17:33:57.575Z","dependency_job_id":"fff53f8d-4b02-4253-ab28-a28977d81f56","html_url":"https://github.com/ajstarks/fc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ajstarks/fc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajstarks%2Ffc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajstarks%2Ffc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajstarks%2Ffc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajstarks%2Ffc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajstarks","download_url":"https://codeload.github.com/ajstarks/fc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajstarks%2Ffc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263943717,"owners_count":23533637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["canvas","fyne","go","golang","gui"],"created_at":"2024-10-11T16:58:27.080Z","updated_at":"2025-07-06T17:38:26.483Z","avatar_url":"https://github.com/ajstarks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fc - high-level canvas for the fyne toolkit\n\n![hello world](hw.png)\n\nis created with:\n\n```\npackage main\n\nimport (\n\t\"image/color\"\n\n\t\"github.com/ajstarks/fc\"\n)\n\nfunc main() {\n\twidth := 500\n\theight := 500\n\tblue := color.RGBA{0, 0, 255, 255}\n\twhite := color.RGBA{255, 255, 255, 255}\n\n\tcanvas := fc.NewCanvas(\"hello\", width, height)\n\n\tcanvas.Circle(50, 0, 100, blue)\n\tcanvas.CText(50, 25, 10, \"hello, world\", white)\n\tcanvas.Image(50, 75, 200, 200, \"earth.jpg\")\n\n\tcanvas.EndRun()\n}\n```\n\n## Introduction\n\nThere are methods for Text (begin, centered, and end aligned), Circles, Lines, Rectangles, and Images.\n\n## Percent coordinate based methods\n\n### NewCanvas makes a new canvas\n\tNewCanvas(name string, w, h int) Canvas\n\n### EndRun shows the content and runs the app\n\t(canvas *Canvas) EndRun()\n\n### Text places text within a container, using percent coordinates\n\t(canvas *Canvas) Text(x, y float64, size float64, s string, color color.RGBA) {\n\n\n### CText places centered text using percent coordinates\n\t(canvas *Canvas) CText(x, y float64, size float64, s string, color color.RGBA) {\n\t\n\n### EText places end-aligned text within a container, using percent coordinates\n\t(canvas *Canvas) EText(x, y float64, size float64, s string, color color.RGBA) {\n\t\n\n### Circle places a circle within a container, using percent coordinates\n\t(canvas *Canvas) Circle(x, y, r float64, color color.RGBA) {\n\t\n\n### Line places a line within a container, using percent coordinates\n\t(canvas *Canvas) Line(x1, y1, x2, y2, size float64, color color.RGBA) {\n\t\n\n### Rect places a rectangle centered on (x,y) within a container, using percent coordinates\n\t(canvas *Canvas) Rect(x, y, w, h float64, color color.RGBA) {\n\t\n\n### CornerRect places a rectangle with upper left corner  on (x,y) within a container, using percent coordinates\n\t(canvas *Canvas) CornerRect(x, y, w, h float64, color color.RGBA) {\n\t\n### Image places an image centered at (x, y) within a container, using percent coordinates\n\t(canvas *Canvas) Image(x, y float64, w, h int, name string) {\n\t\n\n## Absolute methods: uses absolute coordinate system and fyne structures directly\n\n### AbsStart -- begin the application\n\n\tfunc AbsStart(name string, w, h int) (fyne.Window, *fyne.Container)\n\n\n### AbsEndRun -- run the app\n\n\tfunc AbsEnd(window fyne.Window, content *fyne.Container, w, h int) {\n\n### AbsText -- Add text at (x,y) with the specified size and color\n\n\tfunc AbsText(c *fyne.Container, x, y int, s string, size int, color color.RGBA)\n\n### AbsTextMid -- Add Center text\n\n\tfunc AbsTextMid(c *fyne.Container, x, y int, s string, size int, color color.RGBA)\n\n### AbsTectEnd -- Add End-Aligned text\n\n\tfunc AbsTextEnd(c *fyne.Container, x, y int, s string, size int, color color.RGBA)\n\n### AbsLine -- Add  a colored line from (x1,y1) to (x2, y2)\n\n\tfunc AbsLine(c *fyne.Container, x1, y1, x2, y2 int, size float32, color color.RGBA)\n\n### AbsCircle --- Add a circle object centered at (x,y) with radius r\n\n\tfunc AbsCircle(c *fyne.Container, x, y, r int, color color.RGBA)\n\n### AbsCornerRect -- Add a rectangle with (c *fyne.Container, x,y) at the upper left, with dimension (w, h)\n\n\tfunc AbsCornerRect(c *fyne.Container, x, y, w, h int, color color.RGBA)\n\n### AbsRect -- Add a rectangle centered at (c *fyne.Container, x,y), with dimension (w, h)\n\n\tfunc AbsRect(c *fyne.Container, x, y, w, h int, color color.RGBA)\n\n### AbsAdd an image named as name centered at (x, y) with dimensions ( w, h)\n\n\tfunc AbsImage(c *fyne.Container, x, y, w, h int, name string)\n\n### AbsAdd an named image with upper left at (x, y) with dimensions (w, h)\n\n\tfunc AbsCornerImage(c *fyne.Container, x, y, w, h int, name string)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajstarks%2Ffc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajstarks%2Ffc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajstarks%2Ffc/lists"}