|
감사합니다. 둘리님 둘리님께서 설명해 주신대로 수정하니까 잘 작동합니다.
^^;
둘리 님이 쓰신 글 :
: BDS2006에서 GR32_Transforms.pas 파일이 C++ Builder용으로 생성시 문제가 좀 있군요.
:
: GR32_Transforms.pas 파일을 열으셔서
: 다음 부분을 수정하세요..
:
: TRemapTransformation = class(TTransformation)
: private
: FVectorMap : TVectorMap;
: FScalingFixed: TFixedVector;
: FScalingFloat: TFloatVector;
: FCombinedScalingFixed: TFixedVector;
: FCombinedScalingFloat: TFloatVector;
: FSrcTranslationFixed: TFixedVector;
: FSrcScaleFixed: TFixedVector;
: FDstTranslationFixed: TFixedVector;
: FDstScaleFixed: TFixedVector;
: FSrcTranslationFloat: TFloatVector;
: FSrcScaleFloat: TFloatVector;
: FDstTranslationFloat: TFloatVector;
: FDstScaleFloat: TFloatVector;
: FOffsetFixed : TFixedVector;
: FOffsetInt : TPoint;
: FMappingRect: TFloatRect;
: FOffset: TFloatVector;
: procedure SetMappingRect(Rect: TFloatRect);
: procedure SetOffset(const Value: TFloatVector);
: protected
: procedure PrepareTransform; override;
: procedure ReverseTransformInt(DstX, DstY: Integer; out SrcX, SrcY: Integer); override;
: procedure ReverseTransformFloat(DstX, DstY: TFloat; out SrcX, SrcY: TFloat); override;
: procedure ReverseTransformFixed(DstX, DstY: TFixed; out SrcX, SrcY: TFixed); override;
: public
: constructor Create; virtual;
: destructor Destroy; override;
: function HasTransformedBounds: Boolean; override;
: function GetTransformedBounds(const ASrcRect: TFloatRect): TRect; override;
: procedure Scale(Sx, Sy: TFloat);
:
: 여기부터
: property MappingRect: TFloatRect read FMappingRect write SetMappingRect;
: property Offset: TFloatVector read FOffset write SetOffset;
: 여기까지
:
: 두개가 published 에 있었을 겁니다. 이것을 public 으로 옮겨 주셔서 package 컴파일 새로 하시면
: 두개의 property 가 public 으로 물릴 겁니다. 소스 코드 차원에서 수정되는거라 나중에 기억 하셨다가
: 다음 패치때 수정 되었는지 확인도 필요 하겠죠?
: 다른 컴파일 옵션이 있는지는 잘 모르겠습니다만.. 저 같은경우는 일단 위의 방식으로 사용합니다.
:
:
: published
: 원래 여기 있었음.
: property VectorMap: TVectorMap read FVectorMap write FVectorMap;
: end;
:
:
: 수고하세요..
:
: 이형도 님이 쓰신 글 :
: : 여기 Q&A에서 자료를 찾아서 실행해보고 있는데 다음과 같은 에러가 납니다.
: : [C++ Error] GR32_Transforms.hpp(440): E2109 Not an allowed type
: :
: : 소스코드는 다음과 같습니다.
: : //---------------------------------------------------------------------------
: :
: : #include <vcl.h>
: : #pragma hdrstop
: :
: : #include "Unit1.h"
: : #include "GR32_Transforms.hpp"
: :
: : //---------------------------------------------------------------------------
: : #pragma package(smart_init)
: : #pragma link "GR32_Image"
: : //#pragma link "GR32_Image"
: : #pragma resource "*.dfm"
: : TForm1 *Form1;
: : //---------------------------------------------------------------------------
: : __fastcall TForm1::TForm1(TComponent* Owner)
: : : TForm(Owner)
: : {
: : }
: : //---------------------------------------------------------------------------
: :
: : void __fastcall TForm1::TrackBar1Change(TObject *Sender)
: : {
: : int nWidth = img32Src->Width;
: : int nHeight = img32Src->Height;
: :
: : img32Dst->Bitmap->Width = nWidth;
: : img32Dst->Bitmap->Height = nHeight;
: :
: : TAffineTransformation *pT = new TAffineTransformation();
: :
: : pT->SrcRect = FloatRect((float)0, (float)0, (float)nWidth, (float)nHeight);
: : pT->Rotate(nWidth/2, nHeight/2, TrackBar1->Position);
: : img32Dst->BeginUpdate();
: : img32Dst->Bitmap->Clear(clGray32);
: : Transform(img32Dst->Bitmap, img32Src->Bitmap, pT);
: : img32Dst->EndUpdate();
: : img32Dst->Repaint();
: : delete pT;
: : }
: :
: : FloatRect()에서 에러가 나는데 이유를 잘 모르겠어요. 좀 도와 주세요
|