HBITMAP DPlot_GetBitmapEx(int DocNum, int cx, int cy, DPLOT_PLOTMETRICS *DPM);
Parameters
Return Values
Remarks DPLOT_PLOTMETRICS typedef struct tagDPLOT_PLOTMETRICS { DWORD size; // Size of this structure DWORD hll; // horizontal and DWORD vll; // vertical coordinates of the lower left corner of // the plot, in pixels DWORD hur; // horizontal and DWORD vur; // vertical coordinates of the upper right corner of // the plot, in pixels float xlo; // value of x at the left plot extent float ylo; // value of y at the bottom plot extent float xhi; // value of x at the right plot extent float yhi; // value of y at the top plot extent } DPLOT_PLOTMETRICSIn Visual Basic: Type DPLOT_PLOTMETRICS size As Long ' size of this structure hll As Long ' horizontal and vll As Long ' vertical coordinates of the lower left corner of ' the plot, in pixels hur As Long ' horizontal and vur As Long ' vertical coordinates of the upper right corner of ' the plot, in pixels xlo As Single ' value of x at the left plot extent ylo As Single ' value of y at the bottom plot extent xhi As Single ' value of x at the right plot extent yhi As Single ' value of y at the top plot extent End Type Using DPLOT_PLOTMETRICS wx = DPM.xlo + (x - DPM.hll) * (DPM.xhi - DPM.xlo) /(DPM.hur - DPM.hll)Linear Y: wy = DPM.ylo + (y - DPM.vll) * (DPM.yhi - DPM.ylo) / (DPM.vur - DPM.vll)Logarithmic X: wx = DPM.xlo * (DPM.xhi/DPM.xlo) ^ ( (x-DPM.hll)/(DPM.hur-DPM.hll) )Logarithmic Y: wy = DPM.ylo * (DPM.yhi/DPM.ylo) ^ ( (y-DPM.vll)/(DPM.vur-DPM.vll) )Polar coordinates: xp = ( x - ( DPM.hll +DPM.hur )/2. ) * 2.0 * _ ( DPM.yhi - DPM.ylo ) / ( DPM.hur - DPM.hll ) + DPM.ylo yp = ( y - ( DPM.vll +DPM.vur )/2. ) * 2.0 * _ ( DPM.yhi - DPM.ylo ) / ( DPM.vur - DPM.vll ) + DPM.ylo If xp = 0 Then If yp < 0 Then alpha = -90 Else alpha = 90 End If Elseif xp < 0 then alpha = atn(yp/xp) * 180. / PI - 180. Else alpha = atn(yp/xp) * 180. / PI End If If alpha < 0. Then alpha = 360 + alpha End If radius = sqr(xp^2 + yp^2)Triangle plot: wy = 100 * (DPM.vll-y) / (DPM.vll-DPM.vur) wx = 100 * ( (x-DPM.hll) - 0.01*wy*(DPM.vll-DPM.vur)*0.5773502691896) / _ (DPM.hur-DPM.hll)N185 Hydraulic scale: wx = ( (x - DPM.hll) * (DPM.xhi^1.85 - DPM.xlo^1.85) / _ (DPM.hur-DPM.hll) + DPM.xlo^1.85 )^(1.0/1.85)
| |||||||||||
Previous | Home | Next | DPlot Home |