Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
pyMKcam
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
machinery
pyMKcam
Commits
976a0111
Commit
976a0111
authored
Mar 07, 2012
by
Whitham D. Reeve II
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed yet another casualty of the move from Point object to point tuple.
parent
6d9954cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Letters.py
pycam/Geometry/Letters.py
+5
-4
No files found.
pycam/Geometry/Letters.py
View file @
976a0111
...
@@ -105,7 +105,7 @@ class Charset(object):
...
@@ -105,7 +105,7 @@ class Charset(object):
align
=
None
):
align
=
None
):
result
=
ContourModel
()
result
=
ContourModel
()
if
origin
is
None
:
if
origin
is
None
:
origin
=
Point
(
0
,
0
,
0
)
origin
=
(
0
,
0
,
0
)
if
align
is
None
:
if
align
is
None
:
align
=
TEXT_ALIGN_LEFT
align
=
TEXT_ALIGN_LEFT
base
=
origin
base
=
origin
...
@@ -118,7 +118,8 @@ class Charset(object):
...
@@ -118,7 +118,8 @@ class Charset(object):
line_height
=
self
.
default_height
line_height
=
self
.
default_height
for
character
in
line
:
for
character
in
line
:
if
character
==
" "
:
if
character
==
" "
:
base
=
base
.
add
(
Point
(
word_spacing
,
0
,
0
))
base
=
padd
(
base
,
(
word_spacing
,
0
,
0
))
#base = base.add(Point(word_spacing, 0, 0))
elif
character
in
self
.
letters
.
keys
():
elif
character
in
self
.
letters
.
keys
():
charset_letter
=
self
.
letters
[
character
]
charset_letter
=
self
.
letters
[
character
]
new_model
=
ContourModel
()
new_model
=
ContourModel
()
...
@@ -131,8 +132,8 @@ class Charset(object):
...
@@ -131,8 +132,8 @@ class Charset(object):
# update line height
# update line height
line_height
=
max
(
line_height
,
charset_letter
.
maxy
())
line_height
=
max
(
line_height
,
charset_letter
.
maxy
())
# shift the base position
# shift the base position
base
=
base
.
add
((
base
=
padd
(
base
,
(
charset_letter
.
maxx
()
+
letter_spacing
,
0
,
0
))
charset_letter
.
maxx
()
+
letter_spacing
,
0
,
0
))
#base = base.add((
charset_letter.maxx() + letter_spacing, 0, 0))
else
:
else
:
# unknown character - add a small whitespace
# unknown character - add a small whitespace
base
=
padd
(
base
,
(
letter_spacing
,
0
,
0
))
base
=
padd
(
base
,
(
letter_spacing
,
0
,
0
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment