C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[44948] Re:Re:graphics32 컴포너트에서 FloatRect()에러
이형도 [hayaroby] 1009 읽음    2006-05-21 11:18
감사합니다. 둘리님 둘리님께서 설명해 주신대로 수정하니까 잘 작동합니다.
^^;
둘리 님이 쓰신 글 :
: 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()에서 에러가 나는데 이유를 잘 모르겠어요. 좀 도와 주세요

+ -

관련 글 리스트
44942 graphics32 컴포너트에서 FloatRect()에러 이형도 982 2006/05/20
44945     Re:graphics32 컴포너트에서 FloatRect()에러 둘리 1384 2006/05/20
44948         Re:Re:graphics32 컴포너트에서 FloatRect()에러 이형도 1009 2006/05/21
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.