-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#19 Start on card builder for rendering images with text
- Loading branch information
1 parent
0e79762
commit d4839ea
Showing
4 changed files
with
51 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
acropolis-report/src/main/kotlin/org/ephyra/acropolis/report/impl/render/CardBuilder.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package org.ephyra.acropolis.report.impl.render | ||
|
||
import java.io.InputStream | ||
|
||
class CardBuilder( | ||
private val position2D: Position2D, | ||
|
||
private val size2D: Size2D | ||
) { | ||
private var source: InputStream? = null | ||
private var label: String? = null | ||
|
||
fun withImage(source: InputStream): CardBuilder { | ||
this.source = source | ||
return this | ||
} | ||
|
||
fun withLabel(label: String): CardBuilder { | ||
this.label = label | ||
return this | ||
} | ||
|
||
fun build(renderer: DiagramRenderer) { | ||
|
||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
acropolis-report/src/main/kotlin/org/ephyra/acropolis/report/impl/render/Position2D.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.ephyra.acropolis.report.impl.render | ||
|
||
/** | ||
* Represents a position on a 2D plane | ||
*/ | ||
class Position2D( | ||
val x: Float, | ||
val y: Float | ||
) |
6 changes: 6 additions & 0 deletions
6
acropolis-report/src/main/kotlin/org/ephyra/acropolis/report/impl/render/Size2D.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.ephyra.acropolis.report.impl.render | ||
|
||
class Size2D( | ||
val width: Float, | ||
val height: Float | ||
) |