diff options
Diffstat (limited to 'ricky/imgradient')
| -rw-r--r-- | ricky/imgradient/params.py | 42 | ||||
| -rw-r--r-- | ricky/imgradient/selections.py (renamed from ricky/imgradient/options.py) | 44 |
2 files changed, 43 insertions, 43 deletions
diff --git a/ricky/imgradient/params.py b/ricky/imgradient/params.py index f950429..373a9a1 100644 --- a/ricky/imgradient/params.py +++ b/ricky/imgradient/params.py @@ -4,7 +4,7 @@ from ricky.param.username import Username from ricky.param.multiselect import MultiSelect from ricky.param.numberrange import NumberRange from ricky.param.color import Color -from ricky.imgradient.options import * +from ricky.imgradient.selections import * class Params(_Params): @@ -14,47 +14,47 @@ class Params(_Params): NumberRange( name="width", required=1, - options=width_options, + selections=width_selections, min=10, max=800 ), NumberRange( name="height", required=1, - options=height_options, + selections=height_selections, min=10, max=800 ), - Color(name="color1", required=1, options=color1_options), - Color(name="color2", required=1, options=color2_options), + Color(name="color1", required=1, selections=color1_selections), + Color(name="color2", required=1, selections=color2_selections), MultiSelect( name="filetype", required=0, - options=filetype_options + selections=filetype_selections ), MultiSelect( name="gradienttype", required=1, - options=gradienttype_options + selections=gradienttype_selections ), MultiSelect( name="halftone", required=0, - options=halftone_options + selections=halftone_selections ), - MultiSelect(name="bevel", required=0, options=bevel_options), + MultiSelect(name="bevel", required=0, selections=bevel_selections), NumberRange( name="stripenumber", required=0, - options=stripenumber_options, + selections=stripenumber_selections, min=0, max=400 ), NumberRange( name="stripeintensity", required=0, - options=stripeintensity_options, + selections=stripeintensity_selections, min=0, max=5000 ), @@ -62,59 +62,59 @@ class Params(_Params): NumberRange( name="blurriness", required=0, - options=blurriness_options, + selections=blurriness_selections, min=0, max=200 ), # NumberRange( # name="contrast", # required=0, - # options=contrast_options, + # selections=contrast_selections, # min=0, # max=200 # ), NumberRange( name="brightness", required=0, - options=brightness_options, + selections=brightness_selections, min=0, max=200 ), NumberRange( name="saturation", required=0, - options=saturation_options, + selections=saturation_selections, min=0, max=200 ), NumberRange( name="hue", required=0, - options=hue_options, + selections=hue_selections, min=0, max=200 ), NumberRange( name="percentbeveled", required=0, - options=percentbeveled_options, + selections=percentbeveled_selections, min=0, max=100 ), NumberRange( name="rotate", required=0, - options=rotate_options, + selections=rotate_selections, min=0, max=360 ), NumberRange( name="tilt", required=0, - options=tilt_options, + selections=tilt_selections, min=0, max=360 ), - MultiSelect(name="flop", required=0, options=flop_options), - MultiSelect(name="flip", required=0, options=flip_options), + MultiSelect(name="flop", required=0, selections=flop_selections), + MultiSelect(name="flip", required=0, selections=flip_selections), ) diff --git a/ricky/imgradient/options.py b/ricky/imgradient/selections.py index dd14cba..d5eda16 100644 --- a/ricky/imgradient/options.py +++ b/ricky/imgradient/selections.py @@ -1,29 +1,29 @@ -from ricky.param.options import Options +from ricky.param.selections import Selections -width_options = Options.from_dict( +width_selections = Selections.from_dict( {"value": 40, "weight": 60}, {"value": 20, "weight": 60}, {"value": 60, "weight": 60}, {"value": 80, "weight": 60}, ) -height_options = Options.from_dict( +height_selections = Selections.from_dict( {"value": 400, "weight": 900}, ) -color1_options = Options.from_dict( +color1_selections = Selections.from_dict( {"value": "", "weight": 0}, # {"value": "black", "weight": 1}, # {"value": "white", "weight": 2}, ) -color2_options = Options.from_dict( +color2_selections = Selections.from_dict( {"value": "", "weight": 0}, # {"value": "black", "weight": 2}, # {"value": "white", "weight": 1}, ) -stripes_options = Options.from_dict( +stripes_selections = Selections.from_dict( {"value": "true", "weight": 3}, {"value": "false", "weight": 1}, ) -stripenumber_options = Options.from_dict( +stripenumber_selections = Selections.from_dict( {"value": 3, "weight": 10}, {"value": 10, "weight": 10}, {"value": 20, "weight": 10}, @@ -34,19 +34,19 @@ stripenumber_options = Options.from_dict( # {"value": 2, "weight": 50}, ) -stripeintensity_options = Options.from_dict( +stripeintensity_selections = Selections.from_dict( {"value": 1000, "weight": 10}, {"value": 4, "weight": 10}, ) -# contrast_options = \ -brightness_options = \ - saturation_options = \ - hue_options = \ - Options.from_dict( +# contrast_selections = \ +brightness_selections = \ + saturation_selections = \ + hue_selections = \ + Selections.from_dict( {"value": "", "weight": 0}, # {"value": "", "weight": 300}, ) -halftone_options = Options.from_dict( +halftone_selections = Selections.from_dict( {"value": "", "weight": 60}, {"value": "checkeredfade", "weight": 10}, {"value": "etchedtransition", "weight": 10}, @@ -55,7 +55,7 @@ halftone_options = Options.from_dict( {"value": "smallerdots2", "weight": 10}, {"value": "flatstripes", "weight": 10}, ) -bevel_options = Options.from_dict( +bevel_selections = Selections.from_dict( {"value": "", "weight": 4}, {"value": "flatout", "weight": 1}, {"value": "flatinner", "weight": 0}, @@ -66,30 +66,30 @@ bevel_options = Options.from_dict( # {"value": "dramaticflatinner", "weight": 1}, ) -blurriness_options = \ - percentbeveled_options = Options.from_dict( +blurriness_selections = \ + percentbeveled_selections = Selections.from_dict( {"value": 30, "weight": 20}, {"value": 10, "weight": 2}, {"value": "", "weight": 1}, ) -rotate_options = \ - tilt_options = Options.from_dict( +rotate_selections = \ + tilt_selections = Selections.from_dict( {"value": 0, "weight": 200}, {"value": 90, "weight": 2}, {"value": 180, "weight": 2}, {"value": 270, "weight": 2}, ) -flop_options = flip_options = Options.from_dict( +flop_selections = flip_selections = Selections.from_dict( {"value": "", "weight": 1}, {"value": "true", "weight": 1}, ) -filetype_options = Options.from_dict( +filetype_selections = Selections.from_dict( {"value": "png", "weight": 10}, {"value": "jpg", "weight": 2}, {"value": "gif", "weight": 2}, ) -gradienttype_options = Options.from_dict( +gradienttype_selections = Selections.from_dict( {"value": "canvas", "weight": 1}, {"value": "gradient", "weight": 5}, {"value": "radial", "weight": 1}, |
