def parse_card(card)
      new_card = card.clone

      x = Args::UnitConversion.parse(card['x'], @dpi)
      y = Args::UnitConversion.parse(card['y'], @dpi)
      if @template_hash['position_reference'] == :center
        # Normalize it to a top-left positional reference
        x -= card_width / 2
        y -= card_height / 2
      end

      new_card['x'] = x
      new_card['y'] = y
      new_card['rotate'] = parse_rotate_param(
        card['rotate'] ? card['rotate'] : @template_hash['rotate'])
      new_card
    end
def parse_card(card)
      new_card = card.clone

      x = Args::UnitConversion.parse(card['x'], @dpi)
      y = Args::UnitConversion.parse(card['y'], @dpi)
      if @template_hash['position_reference'] == :center
        # Normalize it to a top-left positional reference
        x -= card_width / 2
        y -= card_height / 2
      end

      new_card['x'] = x
      new_card['y'] = y
      new_card['rotate'] = parse_rotate_param(
        card['rotate'] ? card['rotate'] : @template_hash['rotate'])
      new_card
    end
Parse card definitions from template.