Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi all
i created a new Cursor Badge using with file named icons8-broom-40.png but when i load my function it appears like this
its mirrored and have a black background color which the png file is transparent
so where is the problem cause i can solve it
my code that iam using it
public static PromptSelectionResult SelectionSet(string blockName,string message, KeywordCollection keys,bool icon = false)
{
// start select blocks which we want to edit it
// create selection filter with typedvalues
TypedValue[] TypedValues = new TypedValue[1];
TypedValues.SetValue(new TypedValue((int)DxfCode.BlockName, blockName), 0);
SelectionFilter AcSelFtr = new SelectionFilter(TypedValues);
// create keywords options for selection
PromptSelectionOptions AcSelOption = new PromptSelectionOptions();
if (keys != null) foreach (Keyword key in keys) AcSelOption.Keywords.Add(key.GlobalName);
string kws = AcSelOption.Keywords.GetDisplayString(true);
FStarting:
AcSelOption.MessageForAdding = (message + kws);
string input = null;
AcSelOption.KeywordInput +=
delegate (object sender, SelectionTextInputEventArgs e)
{
OnKeywordSelected(keys, e.Input);
input = e.Input;
};
if (input != null) goto FStarting;
ImageBGRA32 _img = null;
var cbu = new CursorBadgeUtilities();
if (icon == true)
{
// use this lines with autocad 2015 or higher
var bmp = new Bitmap(AMRObjectARX.Properties.Resources.icons8_broom_40);
_img = Utils.ConvertBitmapToAcGiImageBGRA32(bmp);
cbu.AddSupplementalCursorImage(_img,10);
}
//start selectionset with keywords and filter
PromptSelectionResult AcSelResult = Application.DocumentManager.MdiActiveDocument.Editor.GetSelection(AcSelOption, AcSelFtr);
//// use this lines with autocad 2015 or higher
if (cbu.HasSupplementalCursorImage() && _img != null) cbu.RemoveSupplementalCursorImage(_img);
return AcSelResult;
}i hope to fix it
Solved! Go to Solution.