Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
magicseteditor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
magicseteditor
Commits
414a1d9e
Commit
414a1d9e
authored
May 19, 2008
by
twanvl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some more tweaks to rotated+shrunk text
parent
fc6b0136
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/gfx/resample_text.cpp
src/gfx/resample_text.cpp
+3
-2
No files found.
src/gfx/resample_text.cpp
View file @
414a1d9e
...
...
@@ -187,8 +187,9 @@ void draw_resampled_text(DC& dc, const RealPoint& pos, const RealRect& rect, dou
// get image
mdc
.
SelectObject
(
wxNullBitmap
);
// step 2. sample down
if
(
!
sideways
(
angle
))
w
=
int
(
w
*
stretch
);
// GCC makes annoying conversion warnings if *= is used here.
else
h
=
int
(
h
*
stretch
);
double
ca
=
fabs
(
cos
(
deg_to_rad
(
angle
))),
sa
=
fabs
(
sin
(
deg_to_rad
(
angle
)));
w
+=
int
(
w
*
(
stretch
-
1
)
*
ca
);
// GCC makes annoying conversion warnings if *= is used here.
h
+=
int
(
h
*
(
stretch
-
1
)
*
sa
);
Image
img_small
(
w
,
h
,
false
);
fill_image
(
img_small
,
color
);
downsample_to_alpha
(
buffer
,
img_small
);
...
...
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