cleanup render code to make room for the opengl rendering engine

This commit is contained in:
Laura Klünder 2017-11-04 23:21:36 +01:00
parent f7291ff237
commit df451f9143
12 changed files with 207 additions and 159 deletions

View file

@ -15,7 +15,6 @@ from shapely.ops import cascaded_union
from c3nav.mapdata.models.locations import SpecificLocation
from c3nav.mapdata.utils.geometry import assert_multipolygon
from c3nav.mapdata.utils.scad import add_indent, polygon_scad
from c3nav.mapdata.utils.svg import SVGImage
class LevelManager(models.Manager):
@ -125,6 +124,7 @@ class Level(SpecificLocation, models.Model):
svg.add_geometry(obstacle_geometries, fill_color='#999999')
def render_svg(self, request, effects=True, draw_spaces=None):
from c3nav.mapdata.render.image.engines.svg import SVGImage
from c3nav.mapdata.models import Source, Area, Door, Space
bounds = Source.max_bounds()

View file

@ -69,7 +69,7 @@ class MapUpdate(models.Model):
from c3nav.mapdata.cache import changed_geometries
changed_geometries.save(last_map_update, self.to_tuple)
from c3nav.mapdata.render.base import LevelRenderData
from c3nav.mapdata.render.image.data import LevelRenderData
LevelRenderData.rebuild()
cache.set('mapdata:last_update', self.to_tuple, 900)