I've got C# code that handles "FreeText" annotations, and now I would like to work with "Stamps",
however I cannot find any sample code or descriptions.
For example, I've tried this basic code which only yields the "DRAFT" stamp - the same one I see in the Editor Stamp Palette under "Standard"
Code: Select all
PXC_Rect myRect;
myRect.left = Convert.ToDouble(XPosTxt.Text);
myRect.bottom = Convert.ToDouble(YPosTxt.Text);
myRect.right = myRect.left + Convert.ToDouble(WidthTxt.Text);
myRect.top = myRect.bottom + Convert.ToDouble(HeightTxt.Text);
IPXS_Inst pxInst = pxcInst.GetExtension("PXS");
uint nStampAtom = pxInst.StrToAtom("Stamp");
Debug.WriteLine("stamp atom is:" + nStampAtom);
IPXC_Annotation pAnnot = inPage.InsertNewAnnot(nStampAtom, myRect);
if (pAnnot == null)
{
Debug.WriteLine("annotation creation failed");
}
else
{
IPXC_AnnotData_Stamp ImageAnnData = (IPXC_AnnotData_Stamp)pAnnot.Data;
pAnnot.Data = ImageAnnData;
}
1) How are the existing Standard stamps (like "DRAFT") created?
Are they file based? Are they programmatically created?
2) Can I create a similar Stamp by accessing the existing stamps, but change the text/color etc. ?
3) How do I use my own image file as a stamp?
Thanks,
Wayne