Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reporting to images #61

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
daaec55
#19 create report service
ThetaSinner Oct 25, 2018
a4bd706
#19 Create report module and define data model
ThetaSinner Oct 26, 2018
0e41d77
#19 create initial helper for rendering diagrams using java2d
ThetaSinner Oct 27, 2018
abc7fd3
#19 Demonstrate how to draw an arrow between two images
ThetaSinner Oct 27, 2018
2d5a2d2
#19 display text
ThetaSinner Oct 27, 2018
cc4e857
#19 Build the report model graph in the report service
ThetaSinner Oct 27, 2018
2836ca7
#19 building report from graph
ThetaSinner Oct 27, 2018
89e70d7
#19 start working on the layout process
ThetaSinner Oct 28, 2018
7797d6f
#19 calculate tile positions
ThetaSinner Oct 29, 2018
548989c
#19 Give the report service access to the graphical asset service
ThetaSinner Oct 30, 2018
f01f3f8
#19 fix detekt issues and add docs
ThetaSinner Oct 30, 2018
5ab3d48
#19 Draw images onto the report
ThetaSinner Nov 10, 2018
eaea754
#19 Create default images for software specializations
ThetaSinner Nov 11, 2018
37e0e29
#19 create application and system graphics and bootstrap command
ThetaSinner Nov 11, 2018
5b3efe9
#19 Bug fix for depth counts and export after report run
ThetaSinner Nov 11, 2018
0e79762
#19 Fixes for positioning
ThetaSinner Nov 11, 2018
d4839ea
#19 Start on card builder for rendering images with text
ThetaSinner Nov 12, 2018
8453b26
#19 draw images and text from the card builder
ThetaSinner Nov 12, 2018
02632c7
#19 Add missing doc comments for classes in the render package
ThetaSinner Nov 13, 2018
9b1fa61
#19 Improve layout for columns in rendering
ThetaSinner Nov 13, 2018
3406096
#19 Fixing detect issues
ThetaSinner Nov 14, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
#19 create initial helper for rendering diagrams using java2d
ThetaSinner committed Oct 27, 2018
commit 0e41d7763b209b0b132c806b2983be2c97e4ded7
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.ephyra.acropolis.report.impl.render

import java.awt.Color
import java.awt.Graphics2D
import java.awt.image.BufferedImage
import java.awt.image.BufferedImage.TYPE_INT_RGB
import java.io.File
import javax.imageio.ImageIO

class DiagramRenderer(
private val width: Int,

private val height: Int
) : AutoCloseable {
private val targetImg: BufferedImage = BufferedImage(width, height, TYPE_INT_RGB)
private val target: Graphics2D

init {
target = targetImg.createGraphics()

target.color = Color.WHITE
target.fillRect(0, 0, width, height)
}

fun addImage(positionX: Int, positionY: Int, source: File) {
val img = ImageIO.read(source)
target.drawImage(img, positionX, positionY, img.width, img.height, null)
}

fun export(outFile: File) {
ImageIO.write(targetImg, outFile.extension, outFile)
}

override fun close() {
target.dispose()
}
}