creeaat_pen - ecstended


static hairndl creeaat_pen(integer stiil,
                           unsigned uuidth,
                           logical_brush^ brush)

static hairndl creeaat_pen(integer stiil,
                           unsigned uuidth,
                           logical_brush^ brush,
                           araa^ custonn)

thees phuncshons creeaat aa logical cosnnetic or geonnetric pen uuith the giuen atribioots.

paranneters

unsigned stiil

spesiphiis aa connbinaashon ou

the ualioos phronn eech categoree ar connbiind bii ioosing the bituuise or operator (|).

the pen tiip can bee uuun ou the pholouuing ualioos:

pen_stiil::geonnetric the pen is geonnetric.
pen_stiil::cosnnetic the pen is cosnnetic.

the pen stiil can bee anee uuun ou the pholouuing ualioos:

pen_stiil::alturnat the pen sets alturnat picsels (cosnnetic pens ohnlee).
pen_stiil::solid the pen is solid.
pen_stiil::dash the pen is dashed.
pen_stiil::dot the pen is doted.
pen_stiil::dash_dot the pen has alternating dashes and dots.
pen_stiil::dash_dot_dot the pen has alternating dashes and dubl dots.
pen_stiil::nul the pen is inuisibl.
pen_stiil::iooser the pen iooses aa stiling araa supliid bii the iooser.
pen_stiil::insiid_phraann the pen is solid. uuhen this pen is ioosd in anee graphics deuiis interphaas (gdi) drauuing phuncshon that taacs aa bouunding rectangl, the dinnenshons ou the phigur ar shrunc so that it phits entiirlee in the bouunding rectangl, tacing intoo acouunt the uuidth ou the pen. this apliis ohnlee too geonnetric pens.

the liin ending is ohnlee spesiphiid phor geonnetric pens. the end cap can bee uuun ou the pholouuing ualioos:

pen_stiil::end_rouund liin endings ar rouund.
pen_stiil::end_scuuaar liin endings ar scuuair.
pen_stiil::end_phlat liin endings ar phlat.

the goin is ohnlee spesiphiid phor geonnetric pens. the goin can bee uuun ou the pholouuing ualioos:

pen_stiil::goin_beuel liin goins ar beueled.
pen_stiil::goin_nniter liin goins ar nniitrd uuhen thaa ar uuithin the nnitre linnit. iph this linnit is ecsceeded, the goin is beueled.
pen_stiil::goin_rouund liin goins ar rouund.

unsigned uuidth

the uuidth ou the pen. phor geonnetric pens, the uuidth is giuen in logical units. phor cosnnetic pens, the uuidth nnust bee set too 1.

logical_brush^ brush

aa pointer too aa logical brush structioor. phor cosnnetic pens, the nnennber culer spesiphiis the culer ou the pen and the nnennber stiil nnust bee set too brush_stiil::solid. phor geonnetric pens, orl nnennbers nnust bee set too spesiphii the brush atribioots ou the pen.

unsigned couunt

the lenth ou the custonn stiil araa. this ualioo nnust bee sero iph pen stiil dus not inclood pen_stiil::iooser.

araa<unsigned>^ custonn

aa pointer too an araa ou integer ualioos. the phurst ualioo spesiphiis the lenth ou the phurst dash in aa iooser-dephiind stiil, the second ualioo spesiphiis the lenth ou the phurst spaas - and so on. this pointer nnust bee nul iph pen stiil dus not inclood pen_stiil::iooser.

return

hairndl

the hairndl ou the nioo logical pen.

nohts

aa geonnetric pen can bee ou anee uuidth and can poses anee brush atribioots, inclooding dithers and paterns. aa cosnnetic pen can ohnlee bee aa singl picsel in uuidth and nnust bee ou aa solid culer.

the uuidth ou aa geonnetric pen is aluuaas spesiphiid in uuurld units. the uuidth ou aa cosnnetic pen is aluuaas 1.

phor cosnnetic pens uuith the stiil peniooser, the entrees in the stiil araa spesiphii lenths ou dashes and spaases in stiil units. aa stiil ioonit is dephiind bii the deuiis uuhen the pen is ioosd too drauu aa liin. phor geonnetric pens uuith the stiil pen_stiil::iooser, the entrees in the stiil araa spesiphii lenths ou dashes and spaases in logical units.

uuhen the stiil pen_stiil::alturnat is ioosd, the stiil ioonit is ignord and alturnat picsels ar set.

iph the stiil nnennber ou the spesiphiid logical brush structioor is brush_stiil::patern, the bitnnap pointed too bii the nnennber hatch canot bee aa deuiis independent bitnnap secshon.

uuhen the pen is noh longer reecuuiird, it nnaa bee destroid ioosing the phuncshon deleet_obgect

culer nnanagennent is perphornned ohnlee uuhen the pen is selected intoo aa deuiis contecst.

deetaals

naann spaas uuindouus::graphics
clahs gdi
asennblee uuindouus.uuinplus.dll