|
이렇게 하면 되는군요.
ㅋㅋ
간단하네요. 혹시나 저 같은 분이 계실지도 모르니까 글 남깁니다.
Result := TPositionedLayer.Create(ImgView.Layers);
--> Result = new TPositionedLayer(ImgView->Layers);
글 봐 주신 분들 행복하세요.
leo21c 님이 쓰신 글 :
: TPositionedLayer.Craate(ImgView.Layers); 델파이 처리 부분을 어떻게 하면 될까요?(Graphics32)
:
: 델파이 부분
: function TMainForm.CreatePositionedLayer: TPositionedLayer;
: var
: P: TPoint;
: begin
: // get coordinates of the center of viewport
: with ImgView.GetViewportRect do
: P := ImgView.ControlToBitmap(Point((Right + Left) div 2, (Top + Bottom) div 2));
:
: Result := TPositionedLayer.Create(ImgView.Layers);
: Result.Location := FloatRect(P.X - 32, P.Y - 32, P.X + 32, P.Y + 32);
: Result.Scaled := True;
: Result.MouseEvents := True;
: Result.OnMouseDown := LayerMouseDown;
: end;
:
:
: C++ Builder에서 처리
:
: TPositionedLayer* __fastcall TMainForm::CreatePositionedLayer()
: {
: TPoint P;
: TPositionedLayer* Result;
: ImgView->ControlToBitmap(P);
:
: // Result = ImgView->Layers;
: // Result := TPositionedLayer.Create(ImgView.Layers); //이분을 어떻게 처리할지 모르겠다.
:
: Result->Location = FloatRect(P.x - 32, P.y - 32, P.x + 32, P.y + 32);
: Result->Scaled = true;
: Result->MouseEvents = true;
: Result->OnMouseDown = LayerMouseDown;
:
: return Result;
: }
:
: 주석에 보이는 것과 같이 이 부분을 어떻게 처리해야 하는지 모르겠습니다.
: 사실 다른 부분도 맞는지는 모르겠습니다.
:
: TPositionedLayer 의 Method에 Create가 있다고 하는데 Result->.... 이렇게 해서 찾아봐도
: Create함수는 없더군요.
: 이부분을 어떻게 처리하면 될까요?
|