'Creates a text decoration.
.. note:: start_pos/end_pos and start_line/end_line pairs let you
easily specify the selected text. You should use one pair or the
other or they will conflict between each others. If you don\'t
specify any values, the selection will be based on the cursor.
:param cursor_or_bloc_or_doc: Reference to a valid
QTextCursor/QTextBlock/QTextDocument
:param start_pos: Selection start position
:param end_pos: Selection end position
:param start_line: Selection start line.
:param end_line: Selection end line.
:param draw_order: The draw order of the selection, highest values will
appear on top of the lowest values.
:param tooltip: An optional tooltips that will be automatically shown
when the mouse cursor hover the decoration.
:param full_width: True to select the full line width.
.. note:: Use the cursor selection if startPos and endPos are none.'

def __init__(self, cursor_or_bloc_or_doc, start_pos=None, end_pos=None, start_line=None, end_line=None, draw_order=0, tooltip=None, full_width=False):

    super(TextDecoration, self).__init__()
    self.signals = self.Signals()
    self.draw_order = draw_order
    self.tooltip = tooltip
    self.cursor = QTextCursor(cursor_or_bloc_or_doc)
    if full_width:
        self.set_full_width(full_width)
    if (start_pos is not None):
        self.cursor.setPosition(start_pos)
    if (end_pos is not None):
        self.cursor.setPosition(end_pos, QTextCursor.KeepAnchor)
    if (start_line is not None):
        self.cursor.movePosition(self.cursor.Start, self.cursor.MoveAnchor)
        self.cursor.movePosition(self.cursor.Down, self.cursor.MoveAnchor, start_line)
    if (end_line is not None):
        self.cursor.movePosition(self.cursor.Down, self.cursor.KeepAnchor, (end_line - start_line))
