Page 1 of 1

cadvcl V6.1 to V9 transparents of TsgDXFLine.Create

Posted: 31 May 2013, 11:50
by Webworker
Hello,

i have a problem with cadvclimport migrate. we change from V6.1 to V9 under delphi6. We get customized sources from you. Now i have a question
of transparency in TsgDXFLine. In our 6.1 version our Code Draw transparent with ability for click event trigger. in V9 it Draws not transparent! i guess it Draw with bsclear maybe in old Version? And there are some changes in Pen propertys in V9.

we use this code

inherited Create(ATransformator);
FEntityLayerName:= LAYER_RAUMNUMMERN_HELPERBOX;
FImageConverter:= AImageConverter;
FColor := AEntityColor;
FParentLabel := ParentLabel;
frect := FParentLabel.Entity.Box;
FEntity := TCWsgDXFSolid.Create;
AImageConverter.Sections[csEntities].AddEntity(FEntity);
TCWsgDXFSolid(FEntity).SetColor(clGray); //TCWsgDXFSolid = TsgDXFLine
TCWsgDXFSolid(FEntity).Visible := False;
TCWsgDXFSolid(FEntity).ShowOnDrawing := False;
TCWsgDXFSolid(FEntity).Selectable := True;
TCWsgDXFSolid(FEntity).Layer := FImageConverter.LayerByName(FEntityLayerName);
TCWsgDXFSolid(FEntity).Point1 := MakeFPoint(frect.left,frect.top,0);
TCWsgDXFSolid(FEntity).Point := MakeFPoint(frect.right,frect.top,0);
TCWsgDXFSolid(FEntity).Point2 := MakeFPoint(frect.right,frect.bottom,0);
TCWsgDXFSolid(FEntity).Point3 := MakeFPoint(frect.left,frect.bottom,0);

if Assigned(FImageConverter.OnCreate) then
FImageConverter.OnCreate(FEntity);

FImageConverter.Loads(FEntity);

have you any suggestion for me?

best regards

Kay-Uwe Pachaly

Re: cadvcl V6.1 to V9 transparents of TsgDXFLine.Create

Posted: 03 Jun 2013, 11:58
by Webworker
*push*

Re: cadvcl V6.1 to V9 transparents of TsgDXFLine.Create

Posted: 03 Jun 2013, 20:17
by support
Hello Kay-Uwe.
The problem with transparency in your project probably depends on TsgDXFEntity.Pen removing from the library. It was done to conserve GDI resources. However TsgCADImage class contains ApplyPen procedure that called from DrawEntity body. We recommend to redefine this procedure to set required (transparent) color depending on entity that will be drawn.
TCWsgDXFSolid in your code looks inherited from TsgDXFSolid, not TsgDXFLine.

Alexander.