Skip to content
This repository has been archived by the owner on Sep 19, 2021. It is now read-only.

Commit

Permalink
add new gui option to save a screenshot, rename screenshot name
Browse files Browse the repository at this point in the history
  • Loading branch information
neophob committed Oct 22, 2013
1 parent e38ec02 commit 834ebcf
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ Changelog v1.4.1 to v1.5.0
-Add Textwriter option (PingPong scrolling, left scrolling)
-Add new Minimum and Maximum Mixer
-Add new keyboard shortcut to select tabs (arrow keys)
-Add new GUI option to save screenshot of all visuals
-Add missing option 'snake cabling' and 'mapping' for TPM2.Net device
-Add missing option 'snake cabling' and 'mapping' for Artnet/E1.31 devices
-Add multipanel support for Artnet/E1.31 output
Expand Down
14 changes: 7 additions & 7 deletions src/main/java/com/neophob/sematrix/glue/Collector.java
Original file line number Diff line number Diff line change
Expand Up @@ -370,19 +370,19 @@ public int getNrOfScreens() {
*/
public void saveScreenshot() {
int ofs=0;
String suffix = frames+".png";
String suffix = ".png";
for (Visual v: allVisuals) {
String prefix = "screenshot/"+ofs;
String prefix = "screenshot/"+frames+"-"+ofs+"-";
PImage p = v.getGeneratorAsImage(0);
p.save(prefix+"-gen1-"+suffix);
p.save(prefix+"gen1"+suffix);
p=v.getGeneratorAsImage(1);
p.save(prefix+"-gen2-"+suffix);
p.save(prefix+"gen2"+suffix);
p=v.getEffectAsImage(0);
p.save(prefix+"-fx1-"+suffix);
p.save(prefix+"fx1"+suffix);
p=v.getEffectAsImage(1);
p.save(prefix+"-fx2-"+suffix);
p.save(prefix+"fx2"+suffix);
p=v.getMixerAsImage();
p.save(prefix+"-mix-"+suffix);
p.save(prefix+"mix"+suffix);
ofs++;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,14 @@ public void setup() {
int ibsX= col.getPixelControllerGenerator().getGenerator(0).getInternalBufferXSize();
int ibsY= col.getPixelControllerGenerator().getGenerator(0).getInternalBufferYSize();
cp5.addTextlabel("nfoInternalBuffer", Messages.getString("GeneratorGui.INFO_INTERNAL_BUFFERSIZE")+ibsX+"/"+ibsY, nfoXPos, nfoYPos).moveTo(infoTab).getValueLabel(); //$NON-NLS-1$ //$NON-NLS-2$
nfoYPos+=yposAdd;

Button saveScreenshot = cp5.addButton(GuiElement.SAVE_SCREENSHOT.guiText(), 0,
nfoXPos, nfoYPos, 110, 15);
saveScreenshot.setCaptionLabel(Messages.getString("GeneratorGui.SAVE_SCREENSHOT")); //$NON-NLS-1$
saveScreenshot.moveTo(infoTab);
cp5.getTooltip().register(GuiElement.SAVE_SCREENSHOT.guiText(), Messages.getString("GeneratorGui.TOOLTIP_SAVE_SCREENSHOT")); //$NON-NLS-1$


nfoXPos += xposAdd;
nfoYPos = yPosStartDrowdown+20;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public enum GuiElement {
LOAD_PRESET,
SAVE_PRESET,

SAVE_SCREENSHOT
;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,10 @@ public void controlEvent(ControlEvent theEvent) {
createMessage(ValidCommands.CHANGE_BRIGHTNESS, brightness);
break;

case SAVE_SCREENSHOT:
createMessage(ValidCommands.SCREENSHOT, "");
break;

default:
LOG.log(Level.INFO, "Invalid Object: "+selection+", Value: "+value);
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,5 @@ GeneratorGui.TEXTWRITER_PINGPONG=PingPong
GeneratorGui.TEXTWRITER_LEFT=Left
GeneratorGui.INFO_WINDOW_HEIGHT=Window Height:
GeneratorGui.INFO_INTERNAL_BUFFERSIZE=Internal Buffersize:
GeneratorGui.SAVE_SCREENSHOT=Save Screenshot
GeneratorGui.TOOLTIP_SAVE_SCREENSHOT=Save current Visuals into the Screenshot directory

0 comments on commit 834ebcf

Please sign in to comment.