# Path: studio/lib/mapscriptutils.py
# class msConstants(dict):
#     def __init__(self,items):
#     def lookup(self,value):
# VERSION_MAJOR = None
# VERSION_MINOR = None
# VERSION_REV = None
#     VERSION_MAJOR = mapscript.MS_VERSION_MAJOR
#     VERSION_MINOR = mapscript.MS_VERSION_MINOR
#     VERSION_REV = mapscript.MS_VERSION_REV
#     VERSION_MAJOR = int(version[0])
#         VERSION_MINOR = int(version[1])
#         VERSION_REV = int(version[2])
#         VERSION_MINOR = int(version[1][0])
#         VERSION_REV='dev'
# SUPPORTS_AGG = "SUPPORTS=AGG " in mapscript.msGetVersion()


import mapscript
import os
import re
from exceptions import AttributeError
from types import *
from pylons import config
from studio.lib import mapscriptutils

    if 'type' in label:
        labelobj.type = mapscriptutils.fonttypes.lookup(label['type'])
    

def update_styleobj_from_dict(styleobj,style,mapobj):
    if 'backgroundcolor' in style:
        update_colorobj_from_dict(styleobj.backgroundcolor,style['backgroundcolor'])
    
    if 'color' in style:
        update_colorobj_from_dict(styleobj.color,style['color'])
    
    if 'outlinecolor' in style:
        update_colorobj_from_dict(styleobj.outlinecolor,style['outlinecolor'])
      
    if 'minsize' in style:
        styleobj.minsize = style['minsize']

    if 'minwidth' in style:
        styleobj.minwidth = style['minwidth']
    
    if 'maxsize' in style:
        styleobj.maxsize = style['maxsize']

    if 'maxwidth' in style:
        styleobj.maxwidth = style['maxwidth']
     
    if 'opacity' in style:
        if (mapscriptutils.VERSION_MAJOR>5
                or (mapscriptutils.VERSION_MAJOR==5

# Path: studio/lib/mapscriptutils.py
# class msConstants(dict):
#     def __init__(self,items):
#     def lookup(self,value):
# VERSION_MAJOR = None
# VERSION_MINOR = None
# VERSION_REV = None
#     VERSION_MAJOR = mapscript.MS_VERSION_MAJOR
#     VERSION_MINOR = mapscript.MS_VERSION_MINOR
#     VERSION_REV = mapscript.MS_VERSION_REV
#     VERSION_MAJOR = int(version[0])
#         VERSION_MINOR = int(version[1])
#         VERSION_REV = int(version[2])
#         VERSION_MINOR = int(version[1][0])
#         VERSION_REV='dev'
# SUPPORTS_AGG = "SUPPORTS=AGG " in mapscript.msGetVersion()


# Path: studio/lib/mapserializer.py
import mapscript
import os
import re
from exceptions import AttributeError
from types import *
from pylons import config
from studio.lib import mapscriptutils


    if 'type' in label:
        labelobj.type = mapscriptutils.fonttypes.lookup(label['type'])
    

def update_styleobj_from_dict(styleobj,style,mapobj):
    if 'backgroundcolor' in style:
        update_colorobj_from_dict(styleobj.backgroundcolor,style['backgroundcolor'])
    
    if 'color' in style:
        update_colorobj_from_dict(styleobj.color,style['color'])
    
    if 'outlinecolor' in style:
        update_colorobj_from_dict(styleobj.outlinecolor,style['outlinecolor'])
      
    if 'minsize' in style:
        styleobj.minsize = style['minsize']

    if 'minwidth' in style:
        styleobj.minwidth = style['minwidth']
    
    if 'maxsize' in style:
        styleobj.maxsize = style['maxsize']

    if 'maxwidth' in style:
        styleobj.maxwidth = style['maxwidth']
     
    if 'opacity' in style:
        if (mapscriptutils.VERSION_MAJOR>5
                or (mapscriptutils.VERSION_MAJOR==5

                and mapscriptutils.VERSION_MINOR>=2)):