-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved some constants to ZoneRendererConstants
Moved utility methods, fogExtents() and zoneExtents(PlayerView view) to ExportDialog as it was the only place they were used. Created ZoneCompositor which will take on the role of determining what to draw. Added ZoneCompositor to ZR constructor Changed get and restore antialiasing to RenderingHints
- Loading branch information
1 parent
c709279
commit 4938b03
Showing
4 changed files
with
212 additions
and
143 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
53 changes: 53 additions & 0 deletions
53
src/main/java/net/rptools/maptool/client/ui/zone/renderer/ZoneCompositor.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,53 @@ | ||
/* | ||
* This software Copyright by the RPTools.net development team, and | ||
* licensed under the Affero GPL Version 3 or, at your option, any later | ||
* version. | ||
* | ||
* MapTool Source Code 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. | ||
* | ||
* You should have received a copy of the GNU Affero General Public | ||
* License * along with this source Code. If not, please visit | ||
* <http://www.gnu.org/licenses/> and specifically the Affero license | ||
* text at <http://www.gnu.org/licenses/agpl.html>. | ||
*/ | ||
package net.rptools.maptool.client.ui.zone.renderer; | ||
|
||
import java.awt.geom.Rectangle2D; | ||
import java.util.*; | ||
import net.rptools.maptool.model.Token; | ||
import net.rptools.maptool.model.Zone; | ||
|
||
/** | ||
* The Zone Compositor is responsible for providing the Zone Renderer with what needs to be | ||
* rendered. Within a given map region what objects exist that need to be drawn. Basically "What's | ||
* on screen?" | ||
*/ | ||
public class ZoneCompositor { | ||
Zone zone; | ||
ZoneRenderer renderer; | ||
private Map<Token, Set<Token>> objectCache; // placeholder | ||
private boolean initialised; | ||
|
||
ZoneCompositor() { | ||
initialised = false; | ||
} | ||
|
||
public boolean isInitialised() { | ||
return initialised; | ||
} | ||
|
||
public void setRenderer(ZoneRenderer zoneRenderer) { | ||
renderer = zoneRenderer; | ||
zone = renderer.getZone(); | ||
initialised = true; | ||
} | ||
|
||
protected Map<Token, Set<Token>> drawWhat(Rectangle2D bounds) { | ||
// Some logic goes here | ||
return objectCache; | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.