
// DashStyle.cpp - style properties of SVG paths

#include <assert.h>

#include "sg/DashStyle.hpp"

// Default constructor
DashStyle::DashStyle()
    : dash_offset(0)
    , dash_offset_reset(SVG_INITIAL_DASH_OFFSET_RESET)
{}

// Copy constructor
DashStyle::DashStyle(const DashStyle &src)
{
    dash_array = src.dash_array;
    dash_offset = src.dash_offset;
    dash_offset_reset = src.dash_offset_reset;
}

bool DashStyle::operator < (const DashStyle& other) const
{
    if (dash_array != other.dash_array)
        return dash_array < other.dash_array;
    if (dash_offset != other.dash_offset)
        return dash_offset < other.dash_offset;
    if (dash_offset_reset != other.dash_offset_reset)
        return dash_offset_reset < other.dash_offset_reset;
    return false;
}

bool DashStyle::operator == (const DashStyle& other) const
{
    if (dash_array != other.dash_array)
        return false;
    if (dash_offset != other.dash_offset)
        return false;
    if (dash_offset_reset != other.dash_offset_reset)
        return false;
    return true;
}
