processing:thermometer_example
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
processing:thermometer_example [2013/08/04 03:16] – [Adding a graphic meter] mithat | processing:thermometer_example [2013/08/04 03:29] – [Adding a graphic meter] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
{{: | {{: | ||
Line 12: | Line 12: | ||
You won't find much description below. I may add some later, but my intent here is just to do a structured code dump. | You won't find much description below. I may add some later, but my intent here is just to do a structured code dump. | ||
- | <WRAP center round important | + | <WRAP center round info 60%> |
Because applet support has been removed in Processing 2 and Processing.js doesn' | Because applet support has been removed in Processing 2 and Processing.js doesn' | ||
</ | </ | ||
Line 346: | Line 346: | ||
| | ||
background(# | background(# | ||
- | | + | |
- | units.getString(ATTRIBUTE_UNIT_TEMPERATURE), | + | int temperature = condition.getInt(ATTRIBUTE_CONDITION_TEMPERATURE); |
- | drawMeter(70, -40, 120, 10, height-2*BORDER, | + | |
+ | | ||
+ | drawMeter(temperature, -40, 120, 10, height-2*BORDER, | ||
} | } | ||
catch (Exception e) { | catch (Exception e) { | ||
Line 365: | Line 367: | ||
/** | /** | ||
- | * Render | + | * Render |
* | * | ||
* @param temperature the temperature to be drawn (int) | * @param temperature the temperature to be drawn (int) | ||
Line 385: | Line 387: | ||
/** | /** | ||
- | * Render | + | * Render |
* | * | ||
* @param val the value to be drawn (float) | * @param val the value to be drawn (float) |
processing/thermometer_example.txt · Last modified: 2013/08/04 03:55 by mithat