Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement the mode parameter of GCOL for drawing commands #49

Closed
breakintoprogram opened this issue May 16, 2023 · 5 comments
Closed

Implement the mode parameter of GCOL for drawing commands #49

breakintoprogram opened this issue May 16, 2023 · 5 comments
Labels
enhancement New feature or request

Comments

@breakintoprogram
Copy link
Owner

breakintoprogram commented May 16, 2023

  • 0: Plot the specified colour
  • 1: OR the colour with the colour already there
  • 2: AND the colour with the colour already there
  • 3: XOR the colour with the colour already there
  • 4: NOT (invert) the colour already there
  • 5: No change to colour already there
  • 6: Clear the colour - set it to colour 0

NB: FabGL only supports NOT and swapping the foreground and background colours

@breakintoprogram breakintoprogram converted this from a draft issue May 16, 2023
@breakintoprogram
Copy link
Owner Author

breakintoprogram commented May 17, 2023

Think the only modes FabGL can support are: 0, 4. All other modes will have no effect.

Not sure how the swap fg/bg colour option works.

@lennart-benschop
Copy link
Contributor

Swap fg/bg is supposed to work like this: for every point you visit:

  • if it has the foreground colour, change it to background colour.
  • else if it has the background colour, change it to foreground colour.
  • else leave the point unchanged.

@lennart-benschop
Copy link
Contributor

I would also implement the distinct 0..7 plot modes:
0..3 use relative coordinates.
4..7 use absolute coordinates
0,4 move, do not draw anything.
1,5 draw in foreground colour.
2,6 draw in inverse colour (this is FabGL's NOT operation I think).
3,7 draw in background colour
FabGL appears to have inverse colour support only for dots and lines, but it would be good to implement all these modes for them. Relative coordinates, fg and bg drawing can also be implemented for the other graphics primitives.

@breakintoprogram
Copy link
Owner Author

breakintoprogram commented May 17, 2023

That's not part of the scope for this card, it is planned though.

@breakintoprogram breakintoprogram moved this from In Progress to QA in AGON Quark Firmware May 17, 2023
@lennart-benschop
Copy link
Contributor

I'll make another card for it then.

@breakintoprogram breakintoprogram added the enhancement New feature or request label May 29, 2023
@breakintoprogram breakintoprogram moved this from QA to Done in AGON Quark Firmware Jun 27, 2023
@breakintoprogram breakintoprogram moved this from Done to QA in AGON Quark Firmware Jun 30, 2023
@breakintoprogram breakintoprogram moved this from QA to Done in AGON Quark Firmware Jun 30, 2023
@breakintoprogram breakintoprogram moved this from Done to Released in AGON Quark Firmware Jul 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Released
Development

No branches or pull requests

2 participants