Function GetFPat returns the fill pattern of the referenced object.
A positive value corresponds to the index of the fill pattern on the pattern palette. A negative value corresponds to internal index of a vector fill pattern applied to the object.
Fill patterns and their associated constants can be found in the VectorScript Appendix.
FUNCTION GetFPat(h : HANDLE): LONGINT;def vs.GetFPat(h):
return LONGINT| Name | Type | Description |
|---|---|---|
| h | HANDLE | Handle to object. |
The negative values need to be converted to positive values for Index2Name to work.
FPatValue:=GetFPat(HandleToObj);FPatValue = vs.GetFPat(HandleToObj) SetFPat(pluginH, 0);
END;
END
ELSE
IF (GetFPat(pluginH) <> 0) THEN
BEGIN
Rect(originX, originY, originX + lngth, originY + thickness);
SetLSN(LNewObj, 0);
END
BEGIN
patID := GetFPat(parentHand);
IF patID < 0 THEN
BEGIN
resHand := GetObject(Index2Name(-patID));
resType := GetTypeN(resHand);
Moveto(Sin(angle)*rad,cos(angle)*rad);
CreateText(anno);
SetTextJust(LNewObj,2);
SetTextVerticalAlign(LNewObj,3);
setfpat(lnewobj,GetFPat(parmHand));
GetFillBack(parmHand,red,grn,bl);
SetFillBack(LNewObj,red,grn,bl);
popattrs;
END;nFillPat = vs.GetFPat( hObjectHand )
if nFillPat != 0:
if vs.IsFPatByClass(gObjHandle):
vs.SetFPatByClass(hObjectHand)
else:
if not vs.IsFPatByClass( objHand ):
penPat = vs.GetFPat( objHand )
vs.FillPat( penPat )
if t != vs.kLineNode and t != vs.kLocusNode and t != vs.kLocus3DNode and t != vs.kGroupNode:
vs.SetFPat(objH, vs.GetFPat(parentH))Availability: from All Versions