Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
ee897278
Commit
ee897278
authored
Nov 06, 2024
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
字体更换
parent
26007824
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
ImageCombined.java
...haoban/manage/service/context/combined/ImageCombined.java
+2
-6
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/context/combined/ImageCombined.java
View file @
ee897278
...
@@ -209,6 +209,8 @@ public class ImageCombined {
...
@@ -209,6 +209,8 @@ public class ImageCombined {
Graphics2D
g
=
combinedImage
.
createGraphics
();
Graphics2D
g
=
combinedImage
.
createGraphics
();
g
.
setColor
(
Color
.
WHITE
);
g
.
setColor
(
Color
.
WHITE
);
g
.
drawImage
(
resizedImage
,
0
,
1
,
null
);
g
.
drawImage
(
resizedImage
,
0
,
1
,
null
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_ANTIALIASING
,
RenderingHints
.
VALUE_ANTIALIAS_ON
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_TEXT_ANTIALIASING
,
RenderingHints
.
VALUE_TEXT_ANTIALIAS_ON
);
if
(
showStyle
==
1
)
{
if
(
showStyle
==
1
)
{
// 不需要留白时,QR码距离底部20px
// 不需要留白时,QR码距离底部20px
...
@@ -235,15 +237,9 @@ public class ImageCombined {
...
@@ -235,15 +237,9 @@ public class ImageCombined {
}
}
private
static
void
addWhiteSpace
(
Graphics2D
g
,
int
width
,
int
finalHeight
,
BufferedImage
qrCode
,
int
qrWidth
,
String
lineOne
,
String
lineTwo
)
{
private
static
void
addWhiteSpace
(
Graphics2D
g
,
int
width
,
int
finalHeight
,
BufferedImage
qrCode
,
int
qrWidth
,
String
lineOne
,
String
lineTwo
)
{
String
[]
fontNames
=
GraphicsEnvironment
.
getLocalGraphicsEnvironment
().
getAvailableFontFamilyNames
();
for
(
String
fontName
:
fontNames
)
{
logger
.
info
(
fontName
);
}
// 添加白色背景
// 添加白色背景
g
.
setColor
(
Color
.
WHITE
);
g
.
setColor
(
Color
.
WHITE
);
g
.
fillRect
(
0
,
finalHeight
-
WHITE_SPACE_HEIGHT
,
width
,
WHITE_SPACE_HEIGHT
);
g
.
fillRect
(
0
,
finalHeight
-
WHITE_SPACE_HEIGHT
,
width
,
WHITE_SPACE_HEIGHT
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_ANTIALIASING
,
RenderingHints
.
VALUE_ANTIALIAS_ON
);
g
.
setRenderingHint
(
RenderingHints
.
KEY_TEXT_ANTIALIASING
,
RenderingHints
.
VALUE_TEXT_ANTIALIAS_ON
);
String
font
=
ApolloUtils
.
combinedFonts
();
String
font
=
ApolloUtils
.
combinedFonts
();
int
type
=
ApolloUtils
.
combinedFontsType
();
int
type
=
ApolloUtils
.
combinedFontsType
();
// 添加门店名称,距底部88px
// 添加门店名称,距底部88px
...
...
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