As the standard means to write in the chart at any angle
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
As the standard means to write in the chart at any angle
How standard means (without Active X) from Akaska to write in the chart the letters at any angle?
- Attachments
-
- 1232725009_15000000.jpg (86.37 KiB) Viewed 11974 times
Re: As the standard means to write in the chart at any angle
hi,
not the same but give you a Idea
not the same but give you a Idea
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
Thank you!
This is sufficient for me to do what I want.
As soon as I saw the text, I remembered that I had read about it, but as it turns out, completely forgot/
Here's another I found:
c:\Program Files (x86)\ALASKA\XPPW32\source\samples\basics\FONT\fancyfnt.prg
This is sufficient for me to do what I want.
As soon as I saw the text, I remembered that I had read about it, but as it turns out, completely forgot/
Here's another I found:
c:\Program Files (x86)\ALASKA\XPPW32\source\samples\basics\FONT\fancyfnt.prg
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
Write text at a given angle turned. But there was another problem. Mode of text rotation is enabled and for subsequent representations of graphical information. How to disable image rotation, or put it into initial state?
Code: Select all
AyName = 'Классиф.шкала: ['+ALLTRIM(STR(mClSc))+']-'+mNameClSc
aMatrix := GraInitMatrix()
GraRotate( oPS, aMatrix, 90, { 40, Y_Max/2+8*LEN(AyName)/2 }, GRA_TRANSFORM_ADD )
oPS:setGraTransform( aMatrix, GRA_TRANSFORM_REPLACE )
GraStringAt( oPS, { 40, Y_Max/2+8*LEN(AyName)/2 }, AyName ) // Надпись оси Y
- Attachments
-
- Inf1-0002-0001rot.jpg (28.19 KiB) Viewed 11897 times
-
- Inf1-0002-0001.jpg (30.23 KiB) Viewed 11897 times
-
- Inf1-0001-0001rot.jpg (28.46 KiB) Viewed 11897 times
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
I was able to write to the graphics object by the given angle.
However, the formation of the next image turns out the problem:
1) somehow it is inserted in the previous one, and does not create a new;
2) is not formed normally, and rotated;
3) also, after you rotate the image to deteriorate the display of linear and drop-down menus.
The question arises: how to disable the image rotation?
Besides, I in the same picture it is necessary to write and normally horizontally and at an angle.
However, the formation of the next image turns out the problem:
1) somehow it is inserted in the previous one, and does not create a new;
2) is not formed normally, and rotated;
3) also, after you rotate the image to deteriorate the display of linear and drop-down menus.
The question arises: how to disable the image rotation?
Besides, I in the same picture it is necessary to write and normally horizontally and at an angle.
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
The first picture turns out fine and the other distorted, and should be as shown below.
- Attachments
-
- Inf3-0002-0001-PosNeg-bad.jpg (30.85 KiB) Viewed 11849 times
-
- Inf3-0002-0001-PosNeg.jpg (137.02 KiB) Viewed 11849 times
-
- Inf3-0001-0001-PosNeg.jpg (28.7 KiB) Viewed 11849 times
Re: As the standard means to write in the chart at any angle
now sure what goes wrong but :Eugene Lutsenko wrote:The question arises: how to disable the image rotation?
Besides, I in the same picture it is necessary to write and normally horizontally and at an angle.
split your work and "save" after each step. than "load" picture again for next step.
greetings by OHR
Jimmy
Jimmy
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
Thank you! It seems to happen to pull what I need from the Alaska example
[/size]
Something seems to be starting to understand... Now I will try to use this in a large system. Is not very good
Code: Select all
//////////////////////////////////////////////////////////////////////
//
// FANCYFNT.PRG
//
// Copyright:
// Alaska Software, (c) 1997-2009. All rights reserved.
//
// Contents:
// This sample program renders some text strings demonstrating the GRA
// engine's GraStringAt() primitive.
//
//////////////////////////////////////////////////////////////////////
#include "appevent.ch"
#include "xbp.ch"
#include "gra.ch"
******************************************************************************
* Main() procedure and event loop
******************************************************************************
PROCEDURE Main
LOCAL nEvent, mp1, mp2, oObj
LOCAL oPS
LOCAL oFont
LOCAL aLineAttrs
LOCAL aStringAttrs
LOCAL aMatrix
LOCAL i
/*
* Setup XbpCrt object created by the AppSys()
* procedure
*/
SetAppWindow():useShortCuts := .T.
SetColor( "N/W+" )
CLS
/* Get presentation space for rendering */
oPS := SetAppWindow():presSpace()
/*
* Rotate text strings to show transforms via
* SetGraTransform()
*/
oFont := XbpFont():new():create("10.Arial Bold")
GraSetFont(oPS , oFont) // установить шрифт
aAttrF := ARRAY( GRA_AS_COUNT )
aAttrF [ GRA_AS_COLOR ] := GRA_CLR_BLACK
aAttrF [ GRA_AS_HORIZALIGN ] := GRA_HALIGN_CENTER // Выравнивание символов по горизонтали по центру относительно точки начала вывода
aAttrF [ GRA_AS_VERTALIGN ] := GRA_VALIGN_HALF // Выравнивание символов по вертикали по средней линии относительно точки начала вывода
GraSetAttrString( oPS, aAttrF )
aMatrix := GraInitMatrix()
FOR i:=1 TO 6
GraRotate( oPS, aMatrix, 60, {200, 200}, GRA_TRANSFORM_ADD )
oPS:setGraTransform( aMatrix, GRA_TRANSFORM_REPLACE )
GraStringAt( oPS, {100,100}, "Повернутый текст..." )
NEXT
oFont := XbpFont():new():create("20.Arial Bold")
GraSetFont(oPS , oFont) // установить шрифт
aAttrF := ARRAY( GRA_AS_COUNT )
aAttrF [ GRA_AS_COLOR ] := GRA_CLR_BLACK
aAttrF [ GRA_AS_HORIZALIGN ] := GRA_HALIGN_LEFT // Выравнивание символов по горизонтали по центру относительно точки начала вывода
aAttrF [ GRA_AS_VERTALIGN ] := GRA_VALIGN_HALF // Выравнивание символов по вертикали по средней линии относительно точки начала вывода
GraSetAttrString( oPS, aAttrF )
GraStringAt( oPS, { 20,200 }, 'Обычный текст после надписей под углом ' )
INKEY(0)
RETURN
// EOF
Something seems to be starting to understand... Now I will try to use this in a large system. Is not very good
- Attachments
-
- Безымянный.jpg (44.07 KiB) Viewed 11844 times
- Eugene Lutsenko
- Posts: 1649
- Joined: Sat Feb 04, 2012 2:23 am
- Location: Russia, Southern federal district, city of Krasnodar
- Contact:
Re: As the standard means to write in the chart at any angle
In General, instead of disable image rotation you can turn up to 360 degrees. Then, then everything seems almost normal. But then not all functions work fine, including the menu (where used DCMENUITEM SEPARATOR).
So a radical solution would be to disable rotation, so that a booth-it was not.
So a radical solution would be to disable rotation, so that a booth-it was not.