Skip to content

Feature Request: PixelBrush<TPixel> #165

Answered by tocsoft
calrsom asked this question in Ideas
Discussion options

You must be logged in to vote

This idea sounds fine to me, from an API/implementation POV I would suggest creating a new class SolidBush<TPixel> whoes CreateApplicator<T> throws if the pixels do not match....alternatively we could fast path with the same pixel type, otherwise we could then call new Color(TBrushPixel.ToRgba32()).ToPixel<TImagePixel>() (or equivalent) to translate between pixel types.

Both versions of SolidBrush (generic and not) would then both use the same internal SolidBrushApplicator<T> (it would just need to be made internal rather than private.)

However saying all that I would like to add you can actually create a custom BrushApplicator<T> in your own codebase, the protected constructor just mean …

Replies: 1 comment 19 replies

Comment options

You must be logged in to vote
19 replies
@antonfirsov
Comment options

@JimBobSquarePants
Comment options

@JimBobSquarePants
Comment options

@calrsom
Comment options

@antonfirsov
Comment options

Answer selected by calrsom
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants