OriginPro
 
Loading...
Searching...
No Matches
originpro.base.GObject Class Reference
Inheritance diagram for originpro.base.GObject:
originpro.base.BaseObject originpro.base.Label originpro.base.Line

Public Member Functions

def __init__ (self, obj, layer)
 
def remove (self)
 
def color (self)
 
def color (self, rgb)
 
- Public Member Functions inherited from originpro.base.BaseObject
def __init__ (self, obj)
 
def __del__ (self)
 
def __str__ (self)
 
def __bool__ (self)
 
def index (self)
 
def get_str (self, prop)
 
def get_int (self, prop)
 
def get_float (self, prop)
 
def set_str (self, prop, value)
 
def set_int (self, prop, value)
 
def set_float (self, prop, value)
 
def method_int (self, name, arg='')
 
def method_float (self, name, arg='')
 
def method_str (self, name, arg='')
 
def lt_exec (self, labtalk)
 
def name (self)
 
def name (self, value)
 
def lname (self)
 
def lname (self, value)
 
def comments (self)
 
def comments (self, value)
 
def show (self)
 
def show (self, value)
 
def usertree (self)
 
def usertree (self, tr)
 
def userprops (self)
 

Public Attributes

 layer
 
- Public Attributes inherited from originpro.base.BaseObject
 obj
 

Detailed Description

This class represents an instance of a text object on a GLayer.

Constructor & Destructor Documentation

◆ __init__()

def originpro.base.GObject.__init__ (   self,
  obj,
  layer 
)

Reimplemented from originpro.base.BaseObject.

Member Function Documentation

◆ color() [1/2]

def originpro.base.GObject.color (   self)
Property getter returns the RGB color of the text object as a tuple (Red, Green, Blue)

Parameters:

Returns:
    (tuple) r,g,b

Examples:
    label = g[0].label('text')
    red, green, blue = label.color

◆ color() [2/2]

def originpro.base.GObject.color (   self,
  rgb 
)
Property setter for the RGB color of the text object

Parameters:
    rgb(int, str, tuple): various way to specify color, see function ocolor(rgb) in op.utils

Returns:
    None

Examples:
    label = g[0].label('text')
    label.color = 'Red'
    label.color = 3            # 'Green'
    label.color = '#00f'       # 'blue'
    label.color = '#0000ff'    # 'blue'
    label.color = [0, 255, 0]  # 'green'

◆ remove()

def originpro.base.GObject.remove (   self)
Deletes label.
Parameters:
    none
Returns:
    None
Examples:
    gl=op.find_graph()[0]
    label = gl.label('xb')
    label.remove()

The documentation for this class was generated from the following file: