User Tools

Site Tools


script:module:gui

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
script:module:gui [2019-11-17 19:47]
skyjake
script:module:gui [2019-11-17 20:55] (current)
skyjake [Functions]
Line 3: Line 3:
 Utilities for GUI applications. Utilities for GUI applications.
  
-#​@Identifier_HTML~setDefaults~@#​ ( #​@Arg_HTML~Record,​d~@#​ )+===== Functions =====
  
-Populate record ​//d// with the default configuration variables for GUI app.+#​@Identifier_HTML~colorAlpha~@#​ ( #​@UArg_HTML~colorVector~@#,​ #​@Arg_HTML~Number,​alpha~@#​ ) 
 + 
 +Returns a new color with the alpha value changed to //alpha//
 + 
 + 
 +#​@Identifier_HTML~colorMix~@#​ ( #​@UArg_HTML~a~@#,​ #​@UArg_HTML~b~@#,​ #​@Arg_HTML~Number,​amount~@#​ ) 
 + 
 +Returns a color where vectors //a// and //b// are interpolated by //amount//. If //amount// is 0, the result is //a//; if //amount// is 1, the result is //b//. 
 + 
 + 
 +#​@Identifier_HTML~dpiScaledImagePath~@#​ ( #​@Arg_HTML~Text,​path~@#​ ) 
 + 
 +Returns a version of //path// where "​@2x"​ is appended to the end 
 +if ''​DisplayMode.PIXEL_RATIO''​ is 2 (approximately).
  
 #​@Identifier_HTML~scale~@#​ ( #​@UArg_HTML~value~@#,​ #​@Arg_HTML~Number,​factor~@#​ ) #​@Identifier_HTML~scale~@#​ ( #​@UArg_HTML~value~@#,​ #​@Arg_HTML~Number,​factor~@#​ )
Line 12: Line 25:
 suffixes "​pt"​ and "​px"​ (point, pixel) are retained in the result. suffixes "​pt"​ and "​px"​ (point, pixel) are retained in the result.
  
-  ; //src// : Value to scale. Number or Text, may have "​pt"​ or "​px"​ as suffix.+  ; //value// : Value to scale. Number or Text, may have "​pt"​ or "​px"​ as suffix.
   ; //factor// : Scale factor.   ; //factor// : Scale factor.
  
-#​@Identifier_HTML~colorMix~@#​ ( #​@UArg_HTML~a~@#,​ #​@UArg_HTML~b~@#,​ #​@Arg_HTML~Number,​amount~@#​ ) 
  
-Returns a color where vectors ​//a// and //b// are interpolated by //amount//. If //amount// is 0, the result is //a//; if //amount// is 1, the result is //b//.+#​@Identifier_HTML~setDefaults~@#​ ( #​@Arg_HTML~Record,​d~@#​ ) 
 + 
 +Populate record ​//d// with the default configuration variables for GUI app.
  
script/module/gui.1574012879.txt.gz · Last modified: 2019-11-17 19:47 by skyjake