diff options
| author | Maximilian Albert <maximilian.albert@gmail.com> | 2008-02-03 14:56:48 +0000 |
|---|---|---|
| committer | cilix42 <cilix42@users.sourceforge.net> | 2008-02-03 14:56:48 +0000 |
| commit | 9724b32fccd5fd94c6ef1819a0794232b19e8af7 (patch) | |
| tree | ba97134ce02768c938789057be6f3e45d48064e3 /src/helper | |
| parent | Fix dragging a connection in the filter effects dialog into the primitive typ... (diff) | |
| download | inkscape-9724b32fccd5fd94c6ef1819a0794232b19e8af7.tar.gz inkscape-9724b32fccd5fd94c6ef1819a0794232b19e8af7.zip | |
Make units pc (pica) and ft (feet) work correctly. Closes: LP #167943.
(bzr r4639)
Diffstat (limited to 'src/helper')
| -rw-r--r-- | src/helper/units.cpp | 2 | ||||
| -rw-r--r-- | src/helper/units.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/helper/units.cpp b/src/helper/units.cpp index a78f5e623..3e632a0ca 100644 --- a/src/helper/units.cpp +++ b/src/helper/units.cpp @@ -36,6 +36,7 @@ SPUnit const sp_units[] = { {SP_UNIT_SCALE, SP_UNIT_DIMENSIONLESS, 1.0, NONE, SVGLength::NONE, N_("Unit"), "", N_("Units"), ""}, {SP_UNIT_PT, SP_UNIT_ABSOLUTE, PX_PER_PT, SP_PT, SVGLength::PT, N_("Point"), N_("pt"), N_("Points"), N_("Pt")}, + {SP_UNIT_PC, SP_UNIT_ABSOLUTE, PX_PER_PC, SP_PC, SVGLength::PC, N_("Pica"), N_("pc"), N_("Picas"), N_("Pc")}, {SP_UNIT_PX, SP_UNIT_DEVICE, PX_PER_PX, SP_PX, SVGLength::PX, N_("Pixel"), N_("px"), N_("Pixels"), N_("Px")}, /* You can add new elements from this point forward */ {SP_UNIT_PERCENT, SP_UNIT_DIMENSIONLESS, 0.01, NONE, SVGLength::PERCENT, N_("Percent"), N_("%"), N_("Percents"), N_("%")}, @@ -43,6 +44,7 @@ SPUnit const sp_units[] = { {SP_UNIT_CM, SP_UNIT_ABSOLUTE, PX_PER_CM, SP_CM, SVGLength::CM, N_("Centimeter"), N_("cm"), N_("Centimeters"), N_("cm")}, {SP_UNIT_M, SP_UNIT_ABSOLUTE, PX_PER_M, SP_M, SVGLength::NONE, N_("Meter"), N_("m"), N_("Meters"), N_("m")}, // no svg_unit {SP_UNIT_IN, SP_UNIT_ABSOLUTE, PX_PER_IN, SP_IN, SVGLength::INCH, N_("Inch"), N_("in"), N_("Inches"), N_("in")}, + {SP_UNIT_FT, SP_UNIT_ABSOLUTE, PX_PER_FT, SP_FT, SVGLength::FOOT, N_("Foot"), N_("ft"), N_("Feet"), N_("ft")}, /* Volatiles do not have default, so there are none here */ // TRANSLATORS: for info, see http://www.w3.org/TR/REC-CSS2/syndata.html#length-units {SP_UNIT_EM, SP_UNIT_VOLATILE, 1.0, NONE, SVGLength::EM, N_("Em square"), N_("em"), N_("Em squares"), N_("em")}, diff --git a/src/helper/units.h b/src/helper/units.h index 3acb65828..8dc62fee6 100644 --- a/src/helper/units.h +++ b/src/helper/units.h @@ -62,6 +62,7 @@ enum SPUnitBase { enum SPUnitId { SP_UNIT_SCALE, // 1.0 == 100% SP_UNIT_PT, // Postscript points: exactly 72 per inch + SP_UNIT_PC, // Pica; there are 12 points per pica SP_UNIT_PX, // "Pixels" in the CSS sense; though Inkscape assumes a constant 90 per inch. SP_UNIT_PERCENT, /* Note: In Inkscape this often means "relative to current value" (for users to edit a value), rather than the SVG/CSS use of percentages. */ @@ -69,6 +70,7 @@ enum SPUnitId { SP_UNIT_CM, // centimetres SP_UNIT_M, // metres SP_UNIT_IN, // inches + SP_UNIT_FT, // foot SP_UNIT_EM, // font-size of relevant font SP_UNIT_EX, // x-height of relevant font sp_max_unit_id = SP_UNIT_EX // For bounds-checking in sp_unit_get_by_id. |
