Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
BraillePlot
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Georg Graßnick
BraillePlot
Commits
b2087bd0
Commit
b2087bd0
authored
5 years ago
by
Andrey Ruzhanskiy
Browse files
Options
Downloads
Patches
Plain Diff
Representation integration
parent
c6586189
No related branches found
Branches containing commit
No related tags found
1 merge request
!40
feat/line rasterizer 31
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/tudresden/inf/mci/brailleplot/rendering/LineChartRasterizer.java
+7
-3
7 additions, 3 deletions
...en/inf/mci/brailleplot/rendering/LineChartRasterizer.java
with
7 additions
and
3 deletions
src/main/java/de/tudresden/inf/mci/brailleplot/rendering/LineChartRasterizer.java
+
7
−
3
View file @
b2087bd0
...
...
@@ -45,7 +45,9 @@ public class LineChartRasterizer implements Rasterizer<LineChart> {
private
final
int
mPaddingXandYText
=
1
;
private
Rectangle
mCellLineArea
;
private
boolean
mPrintOnSamePaper
=
false
;
// If you want to print on the same paper, change this variable to true.
private
BrailleLanguage
.
Language
mLanguage
;
private
int
mTitleHeight
;
private
int
mPaddingToTitle
=
1
;
LineChartRasterizer
()
{
...
...
@@ -69,8 +71,10 @@ public class LineChartRasterizer implements Rasterizer<LineChart> {
if
(
canvas
.
equals
(
null
))
{
throw
new
NullPointerException
(
"The given canvas for the LineChartRasterizer was null!"
);
}
mLanguage
=
BrailleLanguage
.
Language
.
valueOf
(
canvas
.
getRepresentation
().
getProperty
(
"general.brailleLanguage"
).
toString
());
mTitleHeight
=
canvas
.
getRepresentation
().
getProperty
(
"general.maxTitleHeight"
).
toInt
();
mTextRasterizer
=
new
LiblouisBrailleTextRasterizer
(
canvas
.
getPrinter
());
mLegend
=
new
Legend
(
data
.
getTitle
()
);
mLegend
=
new
Legend
(
data
.
getTitle
()
,
mLanguage
);
//
mCanvas
=
canvas
;
mDiagram
=
data
;
...
...
@@ -459,7 +463,7 @@ public class LineChartRasterizer implements Rasterizer<LineChart> {
int
widthOfCompleteArea
=
mCellLineArea
.
intWrapper
().
getWidth
();
int
titleBarHeight
=
mTextRasterizer
.
calculateRequiredHeight
(
mDiagram
.
getTitle
(),
widthOfCompleteArea
,
mCanvas
,
BrailleLanguage
.
Language
.
GERMAN_BASISSCHRIFT
);
try
{
return
mCellLineArea
.
removeFromTop
(
mCanvas
.
getCellYFromDotY
(
t
itle
Bar
Height
)
+
1
);
return
mCellLineArea
.
removeFromTop
(
mCanvas
.
getCellYFromDotY
(
mT
itleHeight
)
+
mPaddingToTitle
);
}
catch
(
Rectangle
.
OutOfSpaceException
e
)
{
throw
new
InsufficientRenderingAreaException
(
"Not enough space to build the title area for the line chart!"
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment