... supply the factor as a parameter:
function resizeImage( cSrc, cDst, nValue )
local nQuality := 0
local oImage := GdiBmp():New( cSrc )
local nFactor := oImage:GetWidth() / If( Empty( nValue ), 400, nValue )
local newHeight := oImage:GetHeight( nFactor )
FErase( cDst )
oImage:Resize( If( Empty ...
Search found 21 matches: nfactor
Searched query: nfactor
- Fri Apr 16, 2021 10:39 am
- Forum: mod_harbour
- Topic: time schedule system
- Replies: 5
- Views: 1173
- Tue Aug 13, 2019 2:08 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: A problem with SAY and font- style and < size default >
- Replies: 5
- Views: 934
A problem with SAY and font- style and < size default >
Hello,
I noticed a SAY painting problem and needed the following adjustment :
@ 26 * nFactor, 25 * nFactor SAY oDay PROMPT cDay OF oWnd FONT oFontDay PIXEL UPDATE
oDay:SetColor ( aVal[23], )
oDay:lTransparent := .T.
oDay:nLeft := ( oWnd:nWidth() - oDay:nWidth() ) / 2
oDay:nHeight += 5 // y display ...
I noticed a SAY painting problem and needed the following adjustment :
@ 26 * nFactor, 25 * nFactor SAY oDay PROMPT cDay OF oWnd FONT oFontDay PIXEL UPDATE
oDay:SetColor ( aVal[23], )
oDay:lTransparent := .T.
oDay:nLeft := ( oWnd:nWidth() - oDay:nWidth() ) / 2
oDay:nHeight += 5 // y display ...
- Sat Mar 10, 2018 11:36 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: FWH MySQL/MariaDB Rowset / Insert / Update
- Replies: 2
- Views: 906
FWH MySQL/MariaDB Rowset / Insert / Update
... vGet:cCodGen ) && PRIMARY KEY
::oMaetabla:FIELDPUT("nombre" ,::vGet:cNomtab )
::oMaetabla:FIELDPUT("nomabr" ,::vGet:cAbrtab )
::oMaetabla:FIELDPUT("factor" ,::vGet:nFactor )
::oMaetabla:FIELDPUT("cuentac" ,::vGet:cCuentac )
::oMaetabla:FIELDPUT("codsunat",::vGet:cCodSunat)
::oMaetabla:save()
::oMaetabla:FIELDPUT("nombre" ,::vGet:cNomtab )
::oMaetabla:FIELDPUT("nomabr" ,::vGet:cAbrtab )
::oMaetabla:FIELDPUT("factor" ,::vGet:nFactor )
::oMaetabla:FIELDPUT("cuentac" ,::vGet:cCuentac )
::oMaetabla:FIELDPUT("codsunat",::vGet:cCodSunat)
::oMaetabla:save()
- Tue Mar 15, 2016 9:05 pm
- Forum: Bugs report & fixes / Informe de errores y arreglos
- Topic: Bug in clausule COLORLEFT
- Replies: 0
- Views: 1723
Bug in clausule COLORLEFT
... nClrHiLi>, <nClrHiLf>, ;
<nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ;
<.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ;
[!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,;
<nFactor>, <nHeight>, [!<.lInherit.>], <.lInvert.>,;
<nRound>, <.lUpper.> ) // lUpper is implemented in next version
<nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ;
<.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ;
[!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,;
<nFactor>, <nHeight>, [!<.lInherit.>], <.lInvert.>,;
<nRound>, <.lUpper.> ) // lUpper is implemented in next version
- Tue Mar 15, 2016 8:55 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Questions to MENU
- Replies: 14
- Views: 3313
Re: Questions to MENU
... nClrHiLi>, <nClrHiLf>, ;
<nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ;
<.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ;
[!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,;
<nFactor>, <nHeight>, [!<.lInherit.>], <.lInvert.>,;
<nRound>, <.lUpper.> ) // lUpper is implemented in next version
<nClrHitx>, <nClrHiBr>, <.lMenuBar.>, <oFont>, ;
<.lColors.>, <.lVert.>, <.l2013.>, <.l2015.>, ;
[!<.lNoBorder.>], <nClrToBr> ,<nClrBkBr>, <nRightSp>,;
<nFactor>, <nHeight>, [!<.lInherit.>], <.lInvert.>,;
<nRound>, <.lUpper.> ) // lUpper is implemented in next version
- Sun Mar 06, 2016 1:46 pm
- Forum: FiveWin for Harbour/xHarbour
- Topic: Is there any TXImage method for resizing JPG images
- Replies: 4
- Views: 876
Re: Is there any TXImage method for resizing JPG images
We can use method Zoom( nFactor ), but it is of no use because tximage does not provide any method to save the image.
If you want to resize a jpeg image and save it, you may try GdiBmp class instead. Here is a sample you may try:
oImage := GdiBmp():New( "file1.jpg" ) oImage:Resize ...
If you want to resize a jpeg image and save it, you may try GdiBmp class instead. Here is a sample you may try:
oImage := GdiBmp():New( "file1.jpg" ) oImage:Resize ...
- Wed Feb 03, 2016 9:44 am
- Forum: FiveWin for Harbour/xHarbour
- Topic: To Antonio
- Replies: 10
- Views: 3495
Re: To Antonio
... 09-29
Cristobal Navarro
e2e13e5
* Cleaning unnecessary code * Enhancement: TMenu, Font to the window does not apply to menu * New: DATA of TMenu: nFactor, visual adjustment percentage for the menus to change the font size of the operating system * New: DATA of TMenu: nRightSp, set number of spaces ...
Cristobal Navarro
e2e13e5
* Cleaning unnecessary code * Enhancement: TMenu, Font to the window does not apply to menu * New: DATA of TMenu: nFactor, visual adjustment percentage for the menus to change the font size of the operating system * New: DATA of TMenu: nRightSp, set number of spaces ...
- Thu Oct 15, 2015 2:57 pm
- Forum: WhatsNew / Novedades
- Topic: New FTDN September/Septiembre 2015 (FWH 15.09)
- Replies: 52
- Views: 21791
Re: New FTDN September/Septiembre 2015 (FWH 15.09)
... of TBar: l2015, new look
* New: DATA of TBar: lBorder
* Enhancement: TMenu, Font to the window does not apply to menu
* New: DATA of TMenu: nFactor, visual adjustment percentage for the
menus to change the font size of the operating system
* New: DATA of TMenu: nRightSp, set number of spaces ...
* New: DATA of TBar: lBorder
* Enhancement: TMenu, Font to the window does not apply to menu
* New: DATA of TMenu: nFactor, visual adjustment percentage for the
menus to change the font size of the operating system
* New: DATA of TMenu: nRightSp, set number of spaces ...
- Sat Sep 26, 2015 10:45 am
- Forum: FiveWin for Harbour/xHarbour
- Topic: Problem with menus
- Replies: 24
- Views: 3798
Re: Problem with menus
... the menuitems with a similar width to which they were before if not defined font
In order to better adjust its dimensions have added the clauses NFACTOR and RIGHTSP of the MENU command and its corresponding DATA
I believe that with these adjustments we can control perfectly dimensions
#xcommand ...
In order to better adjust its dimensions have added the clauses NFACTOR and RIGHTSP of the MENU command and its corresponding DATA
I believe that with these adjustments we can control perfectly dimensions
#xcommand ...
- Sun Sep 02, 2012 1:44 pm
- Forum: FiveWin for CA-Clipper
- Topic: dialog dbcombo looping
- Replies: 3
- Views: 3351
dialog dbcombo looping
... SIZE 40, 12 ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
If oTkm:seek(cOrg+cDrp) = .t.
nKm := KM
nCost := iif(nKm * ( nL_rate + nFactor) < nMin, nMin,nKm * ( nL_rate + nFactor) )
MsgInfo( space(2)+ trans(nKm,'999.99') + " km = " +;
" $ " + trans(nCost,'9999.99')+ space(3 ...
ACTIVATE DIALOG oDlg CENTERED
If oTkm:seek(cOrg+cDrp) = .t.
nKm := KM
nCost := iif(nKm * ( nL_rate + nFactor) < nMin, nMin,nKm * ( nL_rate + nFactor) )
MsgInfo( space(2)+ trans(nKm,'999.99') + " km = " +;
" $ " + trans(nCost,'9999.99')+ space(3 ...
- Wed May 11, 2011 8:16 am
- Forum: FiveWin for Harbour/xHarbour
- Topic: Preview error on windows seven ... RESOLVED!!!!
- Replies: 8
- Views: 1842
Preview error on windows seven ... RESOLVED!!!!
... 20, 0 )
nHeight = ::oWnd:nHeight() - If( ::lZoom .and. ::nZFactor > 1, 20, 0 ) - 10 - ;
I f( LargeFonts(), 100,86 ) //100 80
if ! ::lZoom
nMetaWidth = ( nHeight - 40 ) * nFactor
else
nMetaWidth = nWidth * nFactor
endif
oCoors1 := TRect():New( 40,;
But I think it is no good solution !!!!!
nHeight = ::oWnd:nHeight() - If( ::lZoom .and. ::nZFactor > 1, 20, 0 ) - 10 - ;
I f( LargeFonts(), 100,86 ) //100 80
if ! ::lZoom
nMetaWidth = ( nHeight - 40 ) * nFactor
else
nMetaWidth = nWidth * nFactor
endif
oCoors1 := TRect():New( 40,;
But I think it is no good solution !!!!!
- Thu Jan 14, 2010 10:08 am
- Forum: FiveWin para Harbour/xHarbour
- Topic: preview alpha 2
- Replies: 2
- Views: 2173
Re: preview alpha 2
... METHOD PaintMeta() CLASS TPreview
local oCoors1, oCoors2
local aFiles := ::oDevice:aMeta // DEVICE
local nWidth, nHeight, nFactor, nMetaWidth
if ::oWnd != nil .and. IsIconic( ::oWnd:hWnd )
return nil
endif
do case
case ! ::lTwoPages
if ! ::lZoom
if ::oDevice ...
local oCoors1, oCoors2
local aFiles := ::oDevice:aMeta // DEVICE
local nWidth, nHeight, nFactor, nMetaWidth
if ::oWnd != nil .and. IsIconic( ::oWnd:hWnd )
return nil
endif
do case
case ! ::lTwoPages
if ! ::lZoom
if ::oDevice ...
- Tue Dec 29, 2009 10:43 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Juan Planelles Lazaga
- Replies: 9
- Views: 7596
Re: Juan Planelles Lazaga
... local nLenFonts := Len( oGet:aFonts )
local aFonts := Array( nLenFonts ), cTextForm, nCrLf, lFocus, cChars
local n, nMargen := 4, nCols, nFilas, nFactor := 0.70, nFilaIni := 2, lUser := .t., aJustif := {}
local cText, cMemo := MemoRead( CFGAYUDA ), nWEdit := Eval({|| oGet:nWidth })
local lFile32 ...
local aFonts := Array( nLenFonts ), cTextForm, nCrLf, lFocus, cChars
local n, nMargen := 4, nCols, nFilas, nFactor := 0.70, nFilaIni := 2, lUser := .t., aJustif := {}
local cText, cMemo := MemoRead( CFGAYUDA ), nWEdit := Eval({|| oGet:nWidth })
local lFile32 ...
- Tue Dec 29, 2009 10:39 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Juan Planelles Lazaga
- Replies: 9
- Views: 7596
Re: Juan Planelles Lazaga
... Len( oLine:aText )
local nPosLine := oGet:nLineRow, aTextLine := oLine:aText, aFontsLine := oLine:aFonts, ;
aColorsLine := oLine:aColors
local nFactor := Val( AllTrim( memoLine( cMemo, , 4 ) ) )
nFactor := Max( nFactor, 0.20 )
/*
oGet:GetDC()
bEvalWidt := {|| lSeguir := .t., nWidth := 0 ...
local nPosLine := oGet:nLineRow, aTextLine := oLine:aText, aFontsLine := oLine:aFonts, ;
aColorsLine := oLine:aColors
local nFactor := Val( AllTrim( memoLine( cMemo, , 4 ) ) )
nFactor := Max( nFactor, 0.20 )
/*
oGet:GetDC()
bEvalWidt := {|| lSeguir := .t., nWidth := 0 ...
- Tue Dec 29, 2009 10:27 pm
- Forum: FiveWin para Harbour/xHarbour
- Topic: Juan Planelles Lazaga
- Replies: 9
- Views: 7596
Re: Juan Planelles Lazaga
... return nil
//METHOD Print() CLASS TFGet
Static Function Imprimir( oGet, cName, oFontX, nColorX )
local n, nMargen := 4, nCols, nFilas, nFactor := 0.70, nFilaIni := 2, lUser := .t., aJustif := {}
local xxx := 0, cLine, cLinea, nAncho, nCar, nC, cTx2, cVal := ""
local nRow := 0, nRowNw ...
//METHOD Print() CLASS TFGet
Static Function Imprimir( oGet, cName, oFontX, nColorX )
local n, nMargen := 4, nCols, nFilas, nFactor := 0.70, nFilaIni := 2, lUser := .t., aJustif := {}
local xxx := 0, cLine, cLinea, nAncho, nCar, nC, cTx2, cVal := ""
local nRow := 0, nRowNw ...