en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en en nl en en en en en en en en en pl de en en en en en nl en en en en en en en en en en en nl en en en en en en pl en en en en en en en nl en en en en en en en en en en en en nl en en en en pl en en en en de en en en fr en en en en en en en en en pt en en en en en en
By logging into your account, you agree to our Privacy Policy, personal data processing and storage practices as described therein.
Forgot password or user name?
Search in titles only Search in PowerBASIC for Windows only
You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
All Time Today Last Week Last Month
All Discussions only Photos only Videos only Links only Polls only Events only
Join Date: Sep 2004
22 Oct 2008, 08:02 AM
During the conversion of a program in the new version 9, I have noticed that GRAPHIC SCALE (with coordinates that grow downward), turns upside-down the drawings if the custom world coordinates are equal to the client area of the graphic control (see the sample code below).
I know that this setting is formally wrong because the client area limits go from 0 to the maximum size decreased of 1, but this behavior could perhaps create some problem to other users. This doesn't occur with the previous versions of the compiler.
#COMPILER PBWIN 9 #COMPILE EXE #DIM ALL GLOBAL hDlg AS DWORD GLOBAL grfId AS LONG SUB DrawFrame() LOCAL hFnt, w, h AS LONG CONTROL GET CLIENT hDlg, grfId TO w, h GRAPHIC ATTACH hDlg, grfId, REDRAW GRAPHIC CLEAR %WHITE GRAPHIC SCALE (0, h) - (w, 0) ' GRAPHIC SCALE (0, h-1) - (w-1, 0) ' this works fine... FONT NEW "Arial",18, 1 TO hFnt GRAPHIC SET FONT hFnt GRAPHIC LINE (10, 10) - (w*0.9, 10), %RED GRAPHIC LINE (10, 10) - (10, h*0.9), %RED GRAPHIC LINE (10, 10) - (w*0.9, h*0.9), %BLUE GRAPHIC COLOR %BLACK, %WHITE GRAPHIC SET POS (10,h*0.9) GRAPHIC PRINT "UP" GRAPHIC REDRAW END SUB '------------------------------------------------------------------ CALLBACK FUNCTION DlgProc () AS LONG SELECT CASE CB.MSG CASE %WM_INITDIALOG CASE %WM_COMMAND IF CB.CTLMSG = %BN_CLICKED THEN SELECT CASE CB.CTL CASE %IDCANCEL DIALOG END CB.HNDL END SELECT END IF END SELECT END FUNCTION '------------------------------------------------------------------ FUNCTION PBMAIN () AS LONG LOCAL w, h AS LONG w = 500 h = 500 DIALOG NEW PIXELS, 0, "Graphic test",,, w, h, %WS_CAPTION OR %WS_SYSMENU, 0 TO hDlg CONTROL ADD GRAPHIC, hDlg, grfId, "", 0, 0, w, h DrawFrame DIALOG SHOW MODAL hDlg, CALL DlgProc END FUNCTION
Join Date: May 1994
22 Oct 2008, 09:52 AM
I know the GRAPHIC SCALE issue has already been reported as there was another thread on this some weeks past. http://www.powerbasic.com/support/pb...=GRAPHIC+SCALE
Join Date: Sep 2004
23 Oct 2008, 01:53 AM
thank you for the reply; I had not looked for the solution in the forum because GRAPHIC SCALE had worked well in past release of the compiler.
I have noticed that also Ari Savola goes crazy for understanding the source of the problem; maybe it would be necessary to report this behavior in the PowerBase section of the forum.
Join Date: May 1994
23 Oct 2008, 10:12 AM
maybe it would be necessary to report this behavior in the PowerBase section of the forum
PB knows about the problem. You could write to [email protected] to express your opinion, but PB might not post on it. In this case the user is normally going to visually "see" the problem, look for a thread on it and seek an answer, if not found, by contacting PB at the mail address just given.
Join Date: Sep 2004
24 Oct 2008, 01:30 AM
Ok, many thanks for your explanations
Copyright © 1998-2022 PowerBASIC Tools, LLC - All Rights Reserved.
Powered by vBulletin® Version 5.7.0
Copyright © 2022 vBulletin Solutions, Inc. All rights reserved.
All times are GMT-5. This page was generated at 01:10 AM.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.