Hello,
How can text be drawn at any particular angle?
Steve
-
- Active Member
- Posts: 26
- Joined: 13 Sep 2000 23:01
The LOGFONT structure has a lfOrientation field:
Chan Bok
Axon Research
Code: Select all
typedef struct tagLOGFONT {
LONG lfHeight;
LONG lfWidth;
LONG lfEscapement;
LONG lfOrientation;
LONG lfWeight;
BYTE lfItalic;
BYTE lfUnderline;
BYTE lfStrikeOut;
BYTE lfCharSet;
BYTE lfOutPrecision;
BYTE lfClipPrecision;
BYTE lfQuality;
BYTE lfPitchAndFamily;
TCHAR lfFaceName[LF_FACESIZE];
} LOGFONT, *PLOGFONT;
Chan Bok
Axon Research
-
- Active Member
- Posts: 36
- Joined: 4 Mar 2000 0:01
Addition to Chan Bok's advice
Code: Select all
FONT = vpi::fontCreate(ff_helvetica,List,FontSize),
binary::setIndexed_unsigned(Font,2,10*(Angle)),
binary::setIndexed_unsigned(Font,3,10*(Angle)),
.......
-
- Active Member
- Posts: 26
- Joined: 13 Sep 2000 23:01
-
- VIP Member
- Posts: 56
- Joined: 31 Mar 2001 23:01
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
What does Orientation do in the logFont structure?
OK, I have commented out the stepping with the Orientation variable.
The results were good only by changing the Escapement.
What is the role of the Orientation? Can you give me an example where its value has effect on the drawn text?
The results were good only by changing the Escapement.
What is the role of the Orientation? Can you give me an example where its value has effect on the drawn text?
Code: Select all
predicates
onTestTextOrientation : window::menuItemListener.
clauses
onTestTextOrientation(Task, _MenuTag) :-
tiled:=tile::new1(Task),
_=[
TestWindow
||
std::fromToInStep(0,420,60)=Escapement,
%std::fromToInStep(0,300,60)=Orientation,
Orientation=0,
Title=string::format("Escapement= %3d, orientation = %3d",Escapement,Orientation),
TestWindow=vpi::winCreate(w_TopLevel,rct(0,0,240,240),Title,noMenu,getTaskWindow(),
plainFigure::plain_flags,
testOrientationHandler,gui_api::mkL(1000*Escapement+Orientation)),
asserta(drawmode_window(TestWindow))
].
predicates
testOrientationHandler:eHandler.
clauses
testOrientationHandler(_, e_Create(_)) = gui_api::rNull /* uncheckedConvert(gui_Native::lResult,0) */ :-
_Fit=taskWindow::tiled:move(applicationWindow::get()),
!.
% Mkr used as recommended in upgrade notes
testOrientationHandler(H, e_Update(_Update_Rect)) = gui_api::mkR(3) :-
D=gui_api::getUnsigned(winGetData(H)),
Escapement=D div 1000,
Orientation=D mod 100,
paintObliqueText(H,winGetClientRect(H),winGetText(H),Escapement,Orientation),
!.
testOrientationHandler(H,e_CloseRequest())=gui_api::rNull :-
retractall(drawmode_window(H)),
winDestroy(H),
!.
testOrientationHandler(_Handler, _Event) = gui_api::rNull.
You do not have the required permissions to view the files attached to this post.
TIA, Regards,
Frank Nagy
Frank Nagy
-
- VIP Member
- Posts: 1466
- Joined: 28 Feb 2000 0:01
From the description (LOGFONT structure) it seems that:
- Orientation is for each character, i.e. without changing the "escapement" (which is apparently the direction in which the entire text line points).
- If the graphics mode is GM_COMPATIBLE only the escapement have any effect.
Regards Thomas Linder Puls
PDC
PDC
-
- VIP Member
- Posts: 215
- Joined: 24 Apr 2007 12:26
GM_COMPATIBLE and GM_ADVANCED
Hi,
SetGraphicsMode function:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
What is GM_COMPATIBLE and GM_ADVANCED?
How can I set them from VIP?
What are their main differences?
SetGraphicsMode function:
http://msdn.microsoft.com/en-us/library ... 85%29.aspx
What is GM_COMPATIBLE and GM_ADVANCED?
How can I set them from VIP?
What are their main differences?
TIA, Regards,
Frank Nagy
Frank Nagy