Skip to content

Migrating from fogleman/gg to gogpu/gg #334

Description

@rcarlier

Hello

I've done the "great replacement", migrating from fogleman to gogpu/gg for my programming language Richnou.

Overall, it's going pretty well !!!

A little rewriting around font :

  • rt.Context.SetFontFace(face) undefined
  • dc.LoadFontFace(p, size) deprecated
  • text positionning - which may not have the same default values (I need to investigate)

And the management of background colors on the Context (I primarily work in hexadecimal.)

  • rt.Context.ClearWithColor(gg.Hex(bg))

A "sort of bug" (It's the fault of log and log2) when we passed a NaN value to draw a point...

-600 -179.51958020513098
-600 165.04614733788785
-600 179.519580205131
-600 NaN
runtime: goroutine stack exceeds 1000000000-byte limit
runtime: sp=0x3178e2c6360 stack=[0x3178e2c6000, 0x317ae2c6000]
fatal error: stack overflow

Full log here : https://github.com/rcarlier/tests-gogpugg/blob/main/20260520/log.log

Unit Test:

And apart from that... well, nothing 😃

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions