Laxkit  0.0.7.1
Public Member Functions | Public Attributes
LaxInterfaces::LineStyle Class Reference

Store various characteristics of a line. More...

Inheritance diagram for LaxInterfaces::LineStyle:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 LineStyle (int r, int g, int b, int a, double w, int cap, int join, int dot, int func)
 LineStyle (const LineStyle &l)
LineStyleoperator= (LineStyle &l)
virtual void Color (int r, int g, int b, int a)
 Set the color. Components are 0..0xffff.
virtual void dump_in_atts (LaxFiles::Attribute *att, int flag, Laxkit::anObject *context)
 Dump in.
virtual void dump_out (FILE *f, int indent, int what, Laxkit::anObject *context)
 ***implement mask!! should only output the actually defined values?
virtual int hasStroke ()
 Return whether we will actually be drawing a stroke.
- Public Member Functions inherited from Laxkit::anObject
 anObject ()
 Set object_id=getUniqueNumber().
virtual ~anObject ()
 Empty virtual destructor.
virtual const charwhattype ()
 Returns the type of anObject.
virtual anObjectduplicate (anObject *ref=NULL)
virtual int inc_count ()
 Increment the data's count by 1. Returns count.
virtual int dec_count ()
 Decrement the count of the data, deleting if count is less than or equal to 0.
virtual int the_count ()
- Public Member Functions inherited from LaxFiles::DumpUtility
virtual Attributedump_out_atts (Attribute *att, int what, Laxkit::anObject *savecontext)
 Default is return NULL. what==0 means write out normal Attribute formatted things.
virtual void dump_in (FILE *f, int indent, int what, Laxkit::anObject *loadcontext, Attribute **att)
 Read in a file segment as an Attribute, and pass parsing duties to dump_in_atts.
virtual ~DumpUtility ()
 Empty virtual destructor.

Public Attributes

double width
int widthtype
Laxkit::ScreenColor color
int capstyle
int joinstyle
int dotdash
int function
unsigned long mask
- Public Attributes inherited from Laxkit::anObject
int suppress_debug
DeleteRefCountedFunc deleteMe
 Called when the count is decremented to 0.
unsigned long object_id
charobject_idstr

Additional Inherited Members

- Protected Attributes inherited from Laxkit::anObject
int _count
 The reference count of the object.

Detailed Description

Store various characteristics of a line.

width==0 is taken to be hairline. width<0 is taken to mean invisible. Care should be taken to make sure that (red,green,blue) corresponds to color.

See LaxCapStyle and LaxJoinStyle.

Todo:
int width; *** including invisible vs. hairline (==0)

Member Function Documentation

void LaxInterfaces::LineStyle::dump_out ( FILE *  f,
int  indent,
int  what,
Laxkit::anObject context 
)
virtual

***implement mask!! should only output the actually defined values?

Does:

  color 255 255 255 255
  capstyle round|miter|projecting
  joinstyle round|miter|bevel
  dotdash 1234
  function 1
  mask 2
 

Ignores what. Uses 0 for it.

Implements LaxFiles::DumpUtility.

Referenced by LaxInterfaces::Path::dump_out(), and LaxInterfaces::PathsData::dump_out().

int LaxInterfaces::LineStyle::hasStroke ( )
virtual

Return whether we will actually be drawing a stroke.

Currently, this returns 1 for when function!=LAXOP_Dest and width>=0.

References Laxkit::LAXOP_Dest.


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

Mon Feb 17 2014 11:52:58, Laxkit