Page MenuHomePhabricator

ARGB Colors
Closed, CompletedPublic5 Energy Points (d+f*r)

Description

Objective

Store colors in ARGB format, allowing conversion to/from and handling as: RGBA, CMYK, HSV, and hex codes. For example, it should be possible to define a color via RGBA, modify it as an HSV, and then read it as an ARGB.

Actual rendering should be through T1243: Render Bezier Curves from RIFT bytecode (and later related tasks). Reading from RIFT files should be through T1248: Read from RIFT File.

Dependencies and Tools

All of the following libraries are already linked to rA, either via rLIB or as system-wide dependencies (see the link "Guide: Building Code" below). Use them as needed, and ensure your implementation is compatible as necessary.

  • Cairo: Vector drawing
  • Eigen: Linear algebra library
  • eventpp: Signals and callbacks
  • PawLIB: Testing, Utilities
  • SDL2: Rendering, hardware layer access

Tips

Break down this task into subtasks, and prioritize them. Be sure to mark all four main QTM measures (Priority, Gravity, Friction, Relativity) for each.

Initially, just focus on storing and processing the color data via the different formats, using hard-coded input data. Gradually abstract away the hard-coded values, moving towards deriving the data from RIFT.

As it becomes possible, integrate with T1248: Read from RIFT File and T1243: Render Bezier Curves from RIFT bytecode as appropriate. Define a consistent interface (functions, etc.), and employ loose coupling. Your implementation should not matter to other parts of Anari.

Keep in mind the other objectives in the spec that your design and implementation choices here will affect: 3.6, 3.7, 3.9, 3.10, and 3.14. (See Anari Spec).

References

Anari Spec: 3.5 RGBA/ARGB Colors
RIFT Format Specification

Guide: Building Code — Anari

Details

Task Type
Not Set
Proposed Urgency
Established
Gravity
g5: Critical
Friction
Triage Friction
Relativity
Triage Relativity
Volatility (Caught At)
Not a Bug
Origin
Not a Bug/Unknown

Revisions and Commits

rA Anari
Concern RaisedD248

Event Timeline

jcmcdonald triaged this task as p4: Now priority.Nov 15 2019, 1:45 PM
jcmcdonald created this task.
jcmcdonald created this object with edit policy "Trusted [Group] (Project)".
jcmcdonald moved this task from Backlog to Restricted Project Column on the Anari [Project] board.Nov 15 2019, 2:51 PM
jcmcdonald edited projects, added Unknown Object (Project); removed Anari [Project].

Note: The colors would need to be finally converted to be within range of 0.0 to 1.0 with 0.0 being 0 and 1.0 being 255. The function I'll creating will use floats and it's important that they are in this format. You can do all your conversions on the 0-255 scale but the final function calls need to be of this format to render properly. This is simply a requirement of the Cairo Graphics library.

@mahussain ASAP, please land D248: Color Class (arc land) and mark this task's status as "Complete".

hi jason i had to pull somethings from master can you accept the new differential so i can arc land

jcmcdonald edited projects, added Anari [Project]; removed Unknown Object (Project).Jun 19 2021, 9:36 AM