New FTDN March/Marzo 2018 (FWH 18.03)

Post Reply
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

New FTDN March/Marzo 2018 (FWH 18.03)

Post by Antonio Linares »

March 2018
==========

* Enhancements on Dialog.ch

- Added clause RESIZABLE in definition of DEFINE DIALOG
http://forums.fivetechsupport.com/viewt ... 75#p210711

* Enhancements on Class TGraph

- Added support for XY Graphs, not only time series

- Added Method AddXYSerie( aDat, cLegend, nColor, nType, l3D, lViewVal, lDrawPoint, lDrawLine, cSRLegend )
aDat as { {x1, y}, {x2, y2}, {x3, y3}, .... }

- Added types GRAPH_TYPE_XY_LINES and GRAPH_TYPE_XY_POINTS

- Each serie can be lines or points

- Added new "DATA"s

nXMaxVal // Max Value
nXMinVal // Min Value
XY_nPenwidth // Penwith for the XY data
XY_nPixels // size of the points painted
cXpicture // picture of values in the X axis
nXXRanges // number of ranges in the X axis

Please review new samples\testgrph.prg. Many thanks to Alvaro Quintana for his great help.

* FWMariaRowSet:

- SetGet method PrimaryVal: Fixed bug when record pointer is invalid.

- Method Requery(...) Enhancement: It is now possible to read a totally
different table/sql.
Syntax:
:Requery( cNewSq, aParams ) // same params as for oCn:RowSet() reads
a new rowset data into the present Rowset, replacing the existing data.
Other syntax already availabe in previous versions also:
:Requery() // re-read same sql without changing params if any
:Requery( aParams ) // re-read same sql with new params
Example:
oRs := oCn:RowSet( "select * from states where id > ?", {20} )
// do something with oRs
oRs:Requery( "select * from customer where age > ?",{45} )
// now oRs is a new table

* TDatabase: Fixed bug while handling empty dbf.

* TWBrowse:
- New methods SetOBJ( oDbf/oRs/oQry ) and SetADO( oRs ), make
it easier to setup WBrowse for TDataBase, TRecSet, RecordSet, MariaDB
RowSet, Dolphin/TMySql TQuery.
- New DATA bClrStd: If specified, the codeblock should return an
array of { nClrText, nClrBack } to be used to paint each row.
- New DATA aFooters: Optional Array of footer strings.

* FW_ReadImage( imgSource ) / oWnd:ReadImage( imgSource )
Now, it is possible to read bitmap from a bmpfile, even if the extension s
renamed. Eg: users.bmp renamed as users.xyz can also be used.

* New function HtmlView( cURL, [cTitle] ): Displays url in a resizable dialog.

* More Enhancements on TRibbon class: Style 2016

* Enhancement: samples\FiveDbu.prg now creates the source code for creating the
indexes of a DBF in use with indexes opened from FiveDBU:

http://forums.fivetechsupport.com/viewt ... 04#p211004

* Enhancement: ErrSysW.prg now checks more than 15 indexes. Thanks to Otto:

http://forums.fivetechsupport.com/viewt ... 63#p211063

* Fix: Minor bug in Class TBitmap Method LoadBmp(). Now it is ok.

* New: function function FW_ReOpenRecordSet( oRs, [oCn], ][cSql], [nLockType],
[nCursorType], [nMaxRecords], [nOpt] ) --> oRs // adofuncs.prg

To change cSql, conn, etc of an existing recordset and reopen.

* Enhancement: function FWSavePreviewToPDF():Size of PDFs produced is reduced
by 1/4th. However still the size is much larger than professional products
like MSWord, etc.

* GdiPlus.cpp: Added functions
- GDIPLUSGRAPHSCALE( ptrGraphics, scaleX, scaleY )
- GDIPLUS_EMFTOBMP( cFile, nDensity )
- GDIPLUSIMAGESCALE( ptr, nScale, nInterpolation )
- GDIPLUSPIXISCOLOR( ptr, nX, nY )

* New: function FW_TextToBitmap( cText, [aoFont], [nClrText], [nClrBack],;
[lBorder],[lTransp] ) --> hBitmap
fwh\function\imgtxtio.prg

* New: function FW_MakeYourBitmap( nWidth, nHeight, bDraw ) --> hBitmap
fwh\function\imgtxtio.prg
This function creates a blank surface and calls bDraw with hDC,
nWidth, nHeight as paramters. Programmer can draw any images, shapes,
text, etc in this codeblock. The function returns hBitmap with all
such elements.

* New: function FW_SaveImage( [uImage], [cFile], [nJpgQuality] ) --> lSuccess
uImage: If nil, any image in clipboard is saved.
This parameter can be Bitmap handle, GDI+ Image pointer, or character
value: any image file, resource, webreference.
cFile: If nil, file selection dialog is invoked. File extension can be
bmp, jpg, jpeg, gif, tif, tiff, png
If freeimage.dll is availabe, the extention can be any image type which
freeimage can save.
nJpgQuality: Optional and used in case of jpg/jpeg files only. Value can be
from 0 to 100. 0 for highestt compression and 100 for no compression.

* New: function FW_SaveHBitmap( hBmp, cFileBmp ) --> lSuccess
* New: function FW_SaveHIconToIco( hIcon, cFileIco ) -- lSuccess

* New: function FW_TransformBitmap( hBmp, [aCrop], [nZoom], [nRotate] ) --> hNewBmp
Function to crop, zoom and rotate a bitmap handle.

* Support for converting Applications from DOS to Fivewin:
- @ r,c SAY ... GET ..
- @ r,c, PROMPT ... , MENU TO <n>
- FW_DbEdit(...) to replace DBEDIT(...) function

* New subclause "PT,PTS,POINTS" in clause "SIZE <w>,<h>" in
command "DEFINE FONT":
In all font selection dialogs in FWH and other software like
Excel, MS Word, etc., the size displayed is in Points. When the
font is finally created points are converted into pixels. This
new clause enables the users to specify font size in points.
Usage:
DEFINE FONT oFont NAME "Calibri" SIZE 0,12 POINTS
is equivalent to
DEFINE FONT oFont NAME "Calibri" SIZE 0,-16

* Fix: TBitmap class. Setting DATAS nX and nY to negative values was
not working as expected in versions 18.01 and 18.02. Fixed.

* TXImage class:
- New method SetOrigin( nTop, nLeft )
Sets top and left coordinates of the image
- New method CopytoClipBoard( lAsViewed )
Copies image to clipboard.
If param lAsViewed is .T. (default), image as transformed by the user (rotation,zoom,pan,etc) is copied.
Otherwise, the original image is copied.
- New method Save( lAsViewed, cFile, nJpgQuality )

* TClipboard class (clipbrd.prg): SetBitmap( oBmp/hBmp ):
The parameter can be TBitmap object or hBitmap

* image.prg: New freeimage DLL functions:
FI_GetFileTypeFromFileName( cFile/cExt ) --> nFIFormat
FW_SupportWriting( nFIFormat ) --> lCanWrite

* New: TWindow class: method SaveAsImage( [@]cFile, [aRect] ) --> lSuccess
Applies to all windows,dialogs and controls.
cFile can be of any image type.
aRect: Optional. Default client rect.
regards, saludos

Antonio Linares
www.fivetechsoft.com
Post Reply