Direct2d CB 6.0 error
-
Windows XP/Vista/7 Microsoft Directx SDK (February 2010) Borland C++ 6.0 #include #include #include .... Whats the error [C++ Error] d2d1helper.h(193): E2034 Cannot convert 'const D2D_POINT_2F' to 'float'
:confused: :confused: :confused: :confused: I have no idea what you are trying and what kind of help you want, as your message is very cryptic. However this[^] tells me D2D_POINT_2F is a structure holding two numbers. I am not surprised the compiler refuses to magically convert that into one number. :confused: :confused: :confused: :confused:
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
Windows XP/Vista/7 Microsoft Directx SDK (February 2010) Borland C++ 6.0 #include #include #include .... Whats the error [C++ Error] d2d1helper.h(193): E2034 Cannot convert 'const D2D_POINT_2F' to 'float'
The error here is that you have a point value, and you are trying to cast a single float. A point consists of 2 values, both of which must be supplied. Fill it with
myD2DRef.x = x;
myD2DRef.y = y;"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
:confused: :confused: :confused: :confused: I have no idea what you are trying and what kind of help you want, as your message is very cryptic. However this[^] tells me D2D_POINT_2F is a structure holding two numbers. I am not surprised the compiler refuses to magically convert that into one number. :confused: :confused: :confused: :confused:
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
There are no other kods - 3 #include lines only. D2DBaseType.h : typedef struct D2D_POINT_2F { FLOAT x; FLOAT y; } D2D_POINT_2F; --- d2d1.h : typedef D2D_POINT_2F D2D1_POINT_2F; typedef struct { D2D1_POINT_2F point; D2D1_SIZE_F size; FLOAT rotationAngle; D2D1_SWEEP_DIRECTION sweepDirection; D2D1_ARC_SIZE arcSize; } D2D1_ARC_SEGMENT; --- d2d1helper.h : D2D1FORCEINLINE D2D1_ARC_SEGMENT ArcSegment( __in CONST D2D1_POINT_2F &point, __in CONST D2D1_SIZE_F &size, __in FLOAT rotationAngle, __in D2D1_SWEEP_DIRECTION sweepDirection, __in D2D1_ARC_SIZE arcSize ) { D2D1_ARC_SEGMENT arcSegment = { point, size, rotationAngle, sweepDirection, arcSize }; return arcSegment; } The main difference in structure D2D1_ARC_SEGMENT -> D2D1_POINT_2F point; and ArcSegment( __in CONST D2D1_POINT_2F &point, ... It should be critical -> point and &point :confused: