RSColorPicker icon indicating copy to clipboard operation
RSColorPicker copied to clipboard

Image picker support

Open RSully opened this issue 12 years ago • 6 comments

This branch is a testing ground for adding custom-image support as suggested in #29.

RSully avatar Aug 24 '13 16:08 RSully

This is pretty broken right now given the "state" concept we implemented.

RSully avatar Jan 18 '14 19:01 RSully

I can see why the new state stuff has broken this now I've had a look through the code. I reckon this would be quite a useful addition if it can be made to work with the new code.

dsmurfin avatar Jan 20 '14 17:01 dsmurfin

Yeah I haven't lost hope for this yet.

A few solutions come to mind:

  • New state stuff just has to go
  • Heavy refactoring with if/else for state vs image.
  • State could be refactored into different state types:
    • HSV state
    • Live state (used for custom images, and useful for debugging)

/ping @unixpickle

RSully avatar Jan 20 '14 17:01 RSully

I guess the cleanest option is potentially no.3. That keeps the logic in the same class etc and should result in less changes to RSColorPickerView

dsmurfin avatar Jan 20 '14 17:01 dsmurfin

If we made a state base class and then subclassed it for HSV and Live states that would possibly work. I'll look into it when I'm free.

unixpickle avatar Jan 20 '14 23:01 unixpickle

Even an ~~interface~~/protocol might do the job. Edit: abstract/base class is probably better, as suggested.

RSully avatar Jan 21 '14 00:01 RSully