-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2107cb
commit 715facc
Showing
9 changed files
with
85 additions
and
391 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
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
17 changes: 16 additions & 1 deletion
17
...ain/graphical/javafx/ResizableCanvas.java → ...rg/luwrain/graphical/ResizableCanvas.java
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 |
---|---|---|
@@ -1,6 +1,21 @@ | ||
/* | ||
Copyright 2012-2021 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
package org.luwrain.graphical.javafx; | ||
LUWRAIN is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public | ||
License as published by the Free Software Foundation; either | ||
version 3 of the License, or (at your option) any later version. | ||
LUWRAIN is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.graphical; | ||
|
||
import javafx.scene.canvas.Canvas; | ||
import javafx.scene.layout.StackPane; | ||
|
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
48 changes: 48 additions & 0 deletions
48
src/main/java/org/luwrain/interaction/javafx/ColorUtils.java
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,48 @@ | ||
/* | ||
Copyright 2012-2020 Michael Pozhidaev <[email protected]> | ||
Copyright 2015-2016 Roman Volovodov <[email protected]> | ||
This file is part of LUWRAIN. | ||
LUWRAIN is free software; you can redistribute it and/or | ||
modify it under the terms of the GNU General Public | ||
License as published by the Free Software Foundation; either | ||
version 3 of the License, or (at your option) any later version. | ||
LUWRAIN is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
General Public License for more details. | ||
*/ | ||
|
||
package org.luwrain.interaction.javafx; | ||
|
||
import javafx.scene.paint.Color; | ||
import org.luwrain.base.InteractionParamColor; | ||
|
||
final class ColorUtils | ||
{ | ||
static Color InteractionParamColorToFx(InteractionParamColor ipc) | ||
{ | ||
if(ipc.getPredefined()==null) | ||
return new Color(ipc.getRed()/256,ipc.getGreen()/256,ipc.getBlue()/256,1); | ||
switch(ipc.getPredefined()) | ||
{ | ||
case BLACK: return Color.BLACK; | ||
case BLUE: return Color.BLUE; | ||
case CYAN: return Color.CYAN; | ||
case DARK_GRAY: return Color.DARKGRAY; | ||
case GRAY: return Color.GRAY; | ||
case GREEN: return Color.GREEN; | ||
case LIGHT_GRAY:return Color.LIGHTGRAY; | ||
case MAGENTA: return Color.MAGENTA; | ||
case ORANGE: return Color.ORANGE; | ||
case PINK: return Color.PINK; | ||
case RED: return Color.RED; | ||
case WHITE: return Color.WHITE; | ||
case YELLOW: return Color.YELLOW; | ||
// WARN: not predefined colors have opacity = 1 | ||
default: return new Color(ipc.getRed()/256,ipc.getGreen()/256,ipc.getBlue()/256,1); | ||
} | ||
} | ||
} |
34 changes: 0 additions & 34 deletions
34
src/main/java/org/luwrain/interaction/javafx/InvalidThreadException.java
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.