Simple static font scale methods for unit conversions.
More...
|
| static float | ptToInch (final float points) |
| | Converts the the given points size to inch, dividing by 72 points per inch. More...
|
| |
| static float | ptToMM (final float points) |
| | Converts the the given points size to mm, dividing by 72 * 25.4 points per inch. More...
|
| |
| static float | toPixels (final float points, final float res_dpi) |
| | Converts typical font size in points and screen resolution in dpi (pixels-per-inch) to font size in pixels, which can be used for pixel-size font scaling operations. More...
|
| |
| static float | toPixels2 (final float points, final float res_ppmm) |
| | Converts typical font size in points and screen resolution in pixels (pixels-per-mm) to font size in pixels, which can be used for pixel-size font scaling operations. More...
|
| |
| static float[] | ppmmToPPI (final float[] ppmm) |
| | Converts [1/mm] to [1/inch] in place. More...
|
| |
| static float[] | ppmmToPPI (final float[] ppmm, final float[] res) |
| | Converts [1/mm] to [1/inch] into res storage. More...
|
| |
| static float[] | ppiToPPMM (final float[] ppi) |
| | Converts [1/inch] to [1/mm] in place. More...
|
| |
| static float[] | ppiToPPMM (final float[] ppi, final float[] res) |
| | Converts [1/inch] to [1/mm] into res storage. More...
|
| |
Simple static font scale methods for unit conversions.
PostScript - current DTP point system used e.g in CSS (Cascading Style Sheets).
- 1 point = 1pt = 1/72in (cala) = 0.3528 mm
- 1 pica = 1pc = 12pt= 1/6in (cala) = 4.233(3) mm
Definition at line 37 of file FontScale.java.
◆ ppiToPPMM() [1/2]
| static float[] com.jogamp.graph.font.FontScale.ppiToPPMM |
( |
final float[] |
ppi | ) |
|
|
static |
Converts [1/inch] to [1/mm] in place.
- Parameters
-
| ppi | float[2] [1/inch] value |
- Returns
- return [1/mm] value
Definition at line 128 of file FontScale.java.
◆ ppiToPPMM() [2/2]
| static float[] com.jogamp.graph.font.FontScale.ppiToPPMM |
( |
final float[] |
ppi, |
|
|
final float[] |
res |
|
) |
| |
|
static |
Converts [1/inch] to [1/mm] into res storage.
- Parameters
-
| ppi | float[2] [1/inch] value |
| res | the float[2] result storage |
- Returns
- return [1/mm] value, i.e. the given res storage
Definition at line 140 of file FontScale.java.
◆ ppmmToPPI() [1/2]
| static float[] com.jogamp.graph.font.FontScale.ppmmToPPI |
( |
final float[] |
ppmm | ) |
|
|
static |
Converts [1/mm] to [1/inch] in place.
- Parameters
-
| ppmm | float[2] [1/mm] value |
- Returns
- return [1/inch] value
Definition at line 105 of file FontScale.java.
◆ ppmmToPPI() [2/2]
| static float[] com.jogamp.graph.font.FontScale.ppmmToPPI |
( |
final float[] |
ppmm, |
|
|
final float[] |
res |
|
) |
| |
|
static |
Converts [1/mm] to [1/inch] into res storage.
- Parameters
-
| ppmm | float[2] [1/mm] value |
| res | the float[2] result storage |
- Returns
- return [1/inch] value, i.e. the given res storage
Definition at line 117 of file FontScale.java.
◆ ptToInch()
| static float com.jogamp.graph.font.FontScale.ptToInch |
( |
final float |
points | ) |
|
|
static |
Converts the the given points size to inch, dividing by 72 points per inch.
1 points = 1/72 inch
Definition at line 45 of file FontScale.java.
◆ ptToMM()
| static float com.jogamp.graph.font.FontScale.ptToMM |
( |
final float |
points | ) |
|
|
static |
Converts the the given points size to mm, dividing by 72 * 25.4 points per inch.
1 inch = 25.4 mm
1 points = 1/72 inch
1 points = 1/72 * 25.4 mm
Definition at line 58 of file FontScale.java.
◆ toPixels()
| static float com.jogamp.graph.font.FontScale.toPixels |
( |
final float |
points, |
|
|
final float |
res_dpi |
|
) |
| |
|
static |
Converts typical font size in points and screen resolution in dpi (pixels-per-inch) to font size in pixels, which can be used for pixel-size font scaling operations.
Font Scale Formula:
1 points = 1/72 inch
pixels = points / 72 * res_dpi
- Parameters
-
| points | in points |
| res_dpi | display resolution in pixels-per-inch |
- Returns
- pixelSize scale factor for font operations.
- See also
- toPixels2(float, float)
Definition at line 76 of file FontScale.java.
◆ toPixels2()
| static float com.jogamp.graph.font.FontScale.toPixels2 |
( |
final float |
points, |
|
|
final float |
res_ppmm |
|
) |
| |
|
static |
Converts typical font size in points and screen resolution in pixels (pixels-per-mm) to font size in pixels, which can be used for pixel-size font scaling operations.
Font Scale Formula:
1 inch = 25.4 mm
1 points = 1/72 inch
1 points = 1/72 * 25.4 mm
pixels = points / 72 * 25.4 * res_ppmm
- Parameters
-
| points | in points |
| res_ppmm | display resolution in pixels-per-mm |
- Returns
- pixelSize scale factor for font operations.
- See also
- toPixels(float, float)
Definition at line 96 of file FontScale.java.
The documentation for this class was generated from the following file: