<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ImageComposition" nillable="true" type="ImageComposition" />
  <xs:complexType name="ImageComposition">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Information" type="CInfo" />
      <xs:element minOccurs="0" maxOccurs="1" name="Viewport" type="CView" />
      <xs:element minOccurs="0" maxOccurs="1" name="Drawings" type="ArrayOfGraphicElement" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="CInfo">
    <xs:attribute name="ShortName" type="xs:string" />
    <xs:attribute name="LongName" type="xs:string" />
    <xs:attribute name="Description" type="xs:string" />
    <xs:attribute name="Author" type="xs:string" />
  </xs:complexType>
  <xs:complexType name="CView">
    <xs:attribute name="Color" type="xs:string" />
    <xs:attribute name="Width" type="xs:int" use="required" />
    <xs:attribute name="Height" type="xs:int" use="required" />
    <xs:attribute default="Png" name="ImageFormat" type="ImageFormat" />
    <xs:attribute default="100" name="CompressionPercent" type="xs:int" />
  </xs:complexType>
  <xs:simpleType name="ImageFormat">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Png" />
      <xs:enumeration value="Jpg" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ArrayOfGraphicElement">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Item" nillable="true" type="GraphicElement" />
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="GraphicElement">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="1" name="Display" type="Displays" />
      <xs:element minOccurs="0" maxOccurs="1" name="Rotation" type="Rotations" />
      <xs:element minOccurs="0" maxOccurs="1" name="Fallback" type="GraphicElement" />
      <xs:element minOccurs="0" maxOccurs="1" name="Else" type="GraphicElement" />
      <xs:element minOccurs="0" maxOccurs="1" name="Children" type="ChildrenList" />
    </xs:sequence>
    <xs:attribute default="IsWhatever" name="IfOrientation" type="Orientations" />
    <xs:attribute name="IfSystem" type="xs:string" />
    <xs:attribute name="Type" type="ElementType" use="required" />
    <xs:attribute name="LocalFilePath" type="xs:string" />
    <xs:attribute name="Text" type="xs:string" />
    <xs:attribute default="#00000000" name="TextColor" type="xs:string" />
    <xs:attribute default="TopLeft" name="TextAlign" type="AnchorType" />
    <xs:attribute default="-1" name="TextOutlineWidth" type="xs:int" />
    <xs:attribute default="#00000000" name="TextOutlineColor" type="xs:string" />
    <xs:attribute name="FontFamily" type="xs:string" />
    <xs:attribute name="FontFile" type="xs:string" />
    <xs:attribute default="Regular" name="FontStyle" type="FontStyle" />
    <xs:attribute default="false" name="TestOnly" type="xs:boolean" />
  </xs:complexType>
  <xs:complexType name="Displays">
    <xs:attribute default="Blit" name="Mode" type="DisplayMode" />
    <xs:attribute name="X" type="xs:string" />
    <xs:attribute name="Y" type="xs:string" />
    <xs:attribute default="0" name="Transparency" type="xs:double" />
    <xs:attribute default="High" name="Antialiasing" type="FilteringType" />
    <xs:attribute default="None" name="Effect" type="EffectType" />
    <xs:attribute name="Width" type="xs:string" />
    <xs:attribute name="Height" type="xs:string" />
    <xs:attribute default="TopLeft" name="Anchor" type="AnchorType" />
    <xs:attribute default="true" name="KeepRatio" type="xs:boolean" />
    <xs:attribute default="0" name="X2" type="xs:string" />
    <xs:attribute default="0" name="Y2" type="xs:string" />
    <xs:attribute default="0" name="X3" type="xs:string" />
    <xs:attribute default="0" name="Y3" type="xs:string" />
    <xs:attribute default="0" name="X4" type="xs:string" />
    <xs:attribute default="0" name="Y4" type="xs:string" />
    <xs:attribute default="1" name="BarrelLevel" type="xs:double" />
  </xs:complexType>
  <xs:simpleType name="DisplayMode">
    <xs:restriction base="xs:string">
      <xs:enumeration value="Blit" />
      <xs:enumeration value="Distord" />
      <xs:enumeration value="Barrel" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="FilteringType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="Medium" />
      <xs:enumeration value="High" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="EffectType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="None" />
      <xs:enumeration value="BlackAndWhite" />
      <xs:enumeration value="Sepia" />
      <xs:enumeration value="GreenGameboy" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="AnchorType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="TopLeft" />
      <xs:enumeration value="TopHCenter" />
      <xs:enumeration value="TopRight" />
      <xs:enumeration value="VCenterLeft" />
      <xs:enumeration value="VCenterHCenter" />
      <xs:enumeration value="VCenterRight" />
      <xs:enumeration value="BottomLeft" />
      <xs:enumeration value="BottomHCenter" />
      <xs:enumeration value="BottomRight" />
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="Rotations">
    <xs:attribute default="50%" name="XOffset" type="xs:string" />
    <xs:attribute default="50%" name="YOffset" type="xs:string" />
    <xs:attribute default="0" name="Angle" type="xs:double" />
  </xs:complexType>
  <xs:complexType name="ChildrenList">
    <xs:sequence>
      <xs:element minOccurs="0" maxOccurs="unbounded" name="Item" type="GraphicElement" />
    </xs:sequence>
    <xs:attribute default="false" name="DrawIfNoParent" type="xs:boolean" />
    <xs:attribute default="DoNotChange" name="Reference" type="ReferenceRectangle" />
  </xs:complexType>
  <xs:simpleType name="ReferenceRectangle">
    <xs:restriction base="xs:string">
      <xs:enumeration value="DoNotChange" />
      <xs:enumeration value="Parent" />
      <xs:enumeration value="Viewport" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="Orientations">
    <xs:restriction base="xs:string">
      <xs:enumeration value="IsWhatever" />
      <xs:enumeration value="IsPortrait" />
      <xs:enumeration value="IsLandscape" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ElementType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="NoResource" />
      <xs:enumeration value="Text" />
      <xs:enumeration value="Include" />
      <xs:enumeration value="LocalFile" />
      <xs:enumeration value="Screenshot" />
      <xs:enumeration value="ScreenshotTitle" />
      <xs:enumeration value="FanArt" />
      <xs:enumeration value="Box2DFront" />
      <xs:enumeration value="Box2DSide" />
      <xs:enumeration value="Box2DBack" />
      <xs:enumeration value="Box3D" />
      <xs:enumeration value="Support" />
      <xs:enumeration value="Wheel" />
      <xs:enumeration value="WheelCarbon" />
      <xs:enumeration value="WheelSteel" />
      <xs:enumeration value="Classification" />
      <xs:enumeration value="RecalBoxMixV1" />
      <xs:enumeration value="RecalBoxMixV2" />
      <xs:enumeration value="PictoPlayers" />
      <xs:enumeration value="PictoNote" />
      <xs:enumeration value="SupportTexture" />
      <xs:enumeration value="BoxTexture" />
      <xs:enumeration value="SteamGrid" />
      <xs:enumeration value="ScreenMarquee" />
      <xs:enumeration value="ScreenMarqueeSmall" />
      <xs:enumeration value="Marquee" />
      <xs:enumeration value="Region1" />
      <xs:enumeration value="Region2" />
      <xs:enumeration value="SystemBezel43" />
      <xs:enumeration value="SystemBezel169" />
      <xs:enumeration value="SystemWheel" />
      <xs:enumeration value="SystemCarbonWheel" />
      <xs:enumeration value="SystemSteelWheel" />
      <xs:enumeration value="SystemMonochromeLogo" />
      <xs:enumeration value="SystemIcon" />
      <xs:enumeration value="SystemIconMini" />
      <xs:enumeration value="SystemPhoto" />
      <xs:enumeration value="SystemPicture" />
      <xs:enumeration value="SystemControllerPhoto" />
      <xs:enumeration value="SystemScreenMarquee" />
      <xs:enumeration value="SystemWallPaper" />
      <xs:enumeration value="DeveloperLogo" />
      <xs:enumeration value="DeveloperMonochromeLogo" />
      <xs:enumeration value="PublisherLogo" />
      <xs:enumeration value="PublisherMonochromeLogo" />
      <xs:enumeration value="Genre1Picto" />
      <xs:enumeration value="Genre2Picto" />
      <xs:enumeration value="Genre3Picto" />
      <xs:enumeration value="Genre1MonochromeLogo" />
      <xs:enumeration value="Genre2MonochromeLogo" />
      <xs:enumeration value="Genre3MonochromeLogo" />
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="FontStyle">
    <xs:list>
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="Regular" />
          <xs:enumeration value="Bold" />
          <xs:enumeration value="Italic" />
          <xs:enumeration value="Underline" />
          <xs:enumeration value="Strikeout" />
        </xs:restriction>
      </xs:simpleType>
    </xs:list>
  </xs:simpleType>
</xs:schema>