亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? pglegend.c

?? 開放源碼的編譯器open watcom 1.6.0版的源代碼
?? C
字號:
/****************************************************************************
*
*                            Open Watcom Project
*
*    Portions Copyright (c) 1983-2002 Sybase, Inc. All Rights Reserved.
*
*  ========================================================================
*
*    This file contains Original Code and/or Modifications of Original
*    Code as defined in and that are subject to the Sybase Open Watcom
*    Public License version 1.0 (the 'License'). You may not use this file
*    except in compliance with the License. BY USING THIS FILE YOU AGREE TO
*    ALL TERMS AND CONDITIONS OF THE LICENSE. A copy of the License is
*    provided with the Original Code and Modifications, and is also
*    available at www.sybase.com/developer/opensource.
*
*    The Original Code and all software distributed under the License are
*    distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
*    EXPRESS OR IMPLIED, AND SYBASE AND ALL CONTRIBUTORS HEREBY DISCLAIM
*    ALL SUCH WARRANTIES, INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF
*    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR
*    NON-INFRINGEMENT. Please see the License for the specific language
*    governing rights and limitations under the License.
*
*  ========================================================================
*
* Description:  WHEN YOU FIGURE OUT WHAT THIS FILE DOES, PLEASE
*               DESCRIBE IT HERE!
*
****************************************************************************/


#include <string.h>
#include "pgvars.h"


void _CalcLegendWindow( chartenv _WCI86FAR *env,
                        char _WCI86FAR *_WCI86FAR *serieslabels, short nseries )
//====================================================================

/*  Calculates the size and location of the legendwindow.   */

{
    short               cols;
    short               rows;
    short               max_len;
    short               window_width;
    short               window_height;
    short               legend_width;
    short               legend_height;

    max_len = _MaxLabelLength( serieslabels, nseries, _XVECTOR );
    max_len += 3 * _CharWidth;
    window_width = env->chartwindow.x2 - env->chartwindow.x1 - 2 * _CharWidth;
    window_height = env->chartwindow.y2 - env->chartwindow.y1 - 2 * _CharHeight;
    if( env->legend.place == _PG_BOTTOM ) {
        cols = ( window_width - _CharWidth ) / max_len;
        if( cols <= 1 ) {
            cols = 1;
            rows = nseries;
        } else {
            rows = ( nseries - 1 ) / cols + 1;
            cols = ( nseries - 1 ) / rows + 1;   // balance columns
        }
    } else {
        rows = 2 * window_height / ( 3 * _CharHeight ) - 1;
        if( rows >= nseries ) {
            rows = nseries;
            cols = 1;
        } else {
            cols = ( nseries - 1 ) / rows + 1;
            rows = ( nseries - 1 ) / cols + 1;  // balance # of rows
        }
    }
    legend_width = _CharWidth + cols * max_len;
    legend_height = ( 3 * _CharHeight * ( rows + 1 ) ) / 2;
    if( env->legend.place == _PG_BOTTOM ) {
        env->legend.legendwindow.x1 = env->chartwindow.x1 + _CharWidth +
                                      ( window_width - legend_width ) / 2;
        env->legend.legendwindow.x2 = env->legend.legendwindow.x1 + legend_width;
        env->legend.legendwindow.y2 = env->chartwindow.y2 - _CharHeight;
        env->legend.legendwindow.y1 = env->legend.legendwindow.y2 - legend_height;
    } else {
        env->legend.legendwindow.y1 = env->datawindow.y1;
        env->legend.legendwindow.y2 = env->legend.legendwindow.y1 + legend_height;
        env->legend.legendwindow.x2 = env->chartwindow.x2 - _CharWidth;
        env->legend.legendwindow.x1 = env->legend.legendwindow.x2 - legend_width;
    }
}


short _DrawLegendWindow( chartenv _WCI86FAR *env,
                         char _WCI86FAR *_WCI86FAR *serieslabels, short nseries )
//=====================================================================

/*
    - yspace is the distance from the top of the legend to the
    top of the first category.

    yspace = 2 x ( window_height - num_of_rows x CharHeight )
                  ------------------------------------------
                              num_of_rows + 3

    - y is the top of the current category

    y = legendwindow.y1 + ( current_row - 1 ) x CharHeight +

                                                       current_row - 1
                                        yspace x ( 1 + --------------- )
                                                             2
    current_row = counter / num_of_columns + 1

    - width is the distance from the left of the legendwindow to the
    right of the first category. one width separates each of the
    categories

    width = legend_width - num_of_cols x maxlen
            -----------------------------------
                     num_of_cols + 1

    x = legendwindow.x1 + width x current_col + ( current_col - 1 ) x maxlen

    current_col = counter modulo num_of_cols
*/

{
    short               counter;
    short               cols;
    short               rows;
    short               max_len;
    short               x, y;
    short               legend_height;
    short               legend_width;
    float               width;
    float               yspace;
    char                charbuf[ 2 ];

    max_len = _MaxLabelLength( serieslabels, nseries, _XVECTOR );
    max_len += 2 * _CharWidth;
    legend_width = env->legend.legendwindow.x2 - env->legend.legendwindow.x1;
    legend_height = env->legend.legendwindow.y2 - env->legend.legendwindow.y1;
    cols = legend_width / ( max_len + _CharWidth ) ;
    if( cols <= 1 ) {
        cols = 1;
        rows = nseries;
    } else {
        rows = ( nseries - 1 ) / cols + 1;
        cols = ( nseries - 1 ) / rows + 1;   // balance columns
    }
    _setcliprgn( env->legend.legendwindow.x1, env->legend.legendwindow.y1,
                 env->legend.legendwindow.x2, env->legend.legendwindow.y2 );
    _pg_window( &env->legend.legendwindow );
    charbuf[ 1 ] = '\0';
    width = ( legend_width - cols * max_len ) / ( float )( cols + 1 );
    yspace = 2 * ( legend_height - rows * _CharHeight ) / ( float )( rows + 3 );
    for( counter = 0; counter < nseries; ++counter ) {
        x = env->legend.legendwindow.x1 +
            width * ( counter % cols + 1 ) +
            ( counter % cols ) * max_len;
        y = env->legend.legendwindow.y1 +
            ( counter / cols ) * _CharHeight +
            yspace * ( 1 + ( counter / cols ) / 2.0f );
        _setcolor( _PGPalette[ counter % 15 + 1 ].color );
        if( env->charttype == _PG_LINECHART || env->charttype == _PG_SCATTERCHART ) {
            charbuf[ 0 ] = _PGPalette[ counter % 15 + 1 ].plotchar;
            _moveto( x, y );
            _outgtext( charbuf );
        } else {
            _setfillmask( _PGPalette[ counter % 15 + 1 ].fill );
            _rectangle( _GFILLINTERIOR, x, y, x + _CharWidth, y + _CharHeight );
        }
        _setcolor( _PGPalette[ env->legend.textcolor ].color );
        _moveto( x + 2 * _CharWidth, y );
        _outgtext( serieslabels[ counter ] );
    }
    return( 0 );
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99re热视频精品| 久久免费偷拍视频| 久久综合色一综合色88| 日韩码欧中文字| 精品一区二区三区不卡| 色哟哟国产精品| 国产精品无圣光一区二区| 天使萌一区二区三区免费观看| 成人一道本在线| 欧美不卡一区二区三区| 亚洲sss视频在线视频| 成人黄色免费短视频| 精品剧情在线观看| 日韩中文字幕不卡| 在线观看国产精品网站| 亚洲欧洲韩国日本视频| 在线中文字幕不卡| 精品999久久久| 图片区小说区国产精品视频| 91色porny在线视频| 国产午夜精品久久久久久久| 久久成人精品无人区| 欧美久久久久久久久| 亚洲小说欧美激情另类| 97久久超碰国产精品电影| 欧美激情一区不卡| 国产91丝袜在线播放| 久久夜色精品国产噜噜av| 美女一区二区三区| 欧美一区二区三区视频在线 | 丝袜亚洲另类欧美综合| 日本韩国欧美在线| 亚洲综合色噜噜狠狠| 欧美在线一区二区| 亚洲一区二区三区免费视频| 在线免费亚洲电影| 亚洲成av人片一区二区梦乃| 欧美午夜精品一区| 日本中文字幕一区二区有限公司| 欧美日韩aaa| 免费成人在线视频观看| 日韩欧美不卡一区| 国产精品一区二区三区四区| 国产亚洲午夜高清国产拍精品| 国产精品白丝av| 国产精品久久久久久久久动漫| 99精品偷自拍| 亚洲一级二级三级| 欧美一区二区三区视频免费播放 | 久久丁香综合五月国产三级网站| 欧美变态tickling挠脚心| 国产一区二区三区在线观看精品 | 曰韩精品一区二区| 在线一区二区三区做爰视频网站| 亚洲午夜久久久久久久久电影网 | 亚洲国产人成综合网站| 欧美精品一级二级| 国产一区二区三区久久久| 国产精品天美传媒| 欧美蜜桃一区二区三区 | 亚洲欧美一区二区三区久本道91| 91成人国产精品| 精品一区二区三区免费视频| 欧美国产禁国产网站cc| 欧美在线啊v一区| 另类小说一区二区三区| 国产精品久久久久永久免费观看 | 精品国产一区二区三区忘忧草| 国产一区二区电影| 一区二区在线观看视频| 欧美电视剧在线看免费| 成人动漫中文字幕| 蜜桃久久av一区| 亚洲欧美日本在线| 精品国产伦理网| 91免费国产视频网站| 麻豆精品在线播放| 亚洲精品五月天| 精品sm在线观看| 欧美日韩卡一卡二| www.亚洲国产| 精品亚洲porn| 视频一区在线视频| 国产精品福利一区| 欧美精品一区二区三| 精品视频资源站| 色综合久久88色综合天天6| 国产在线精品免费| 午夜欧美电影在线观看| 国产精品久久综合| 国产网站一区二区| 欧美va在线播放| 国产欧美日韩不卡免费| 欧美四级电影网| av不卡一区二区三区| 国产综合久久久久久鬼色| 午夜精品免费在线| 伊人色综合久久天天人手人婷| 欧美精品一区二区三区四区| 7777精品伊人久久久大香线蕉的 | 亚洲精品视频在线| 久久久久久久久久久黄色 | 99久久亚洲一区二区三区青草| 理论电影国产精品| 日韩制服丝袜先锋影音| 亚洲五月六月丁香激情| 亚洲欧美精品午睡沙发| 国产精品久久久久一区二区三区| 精品黑人一区二区三区久久| 欧美日韩高清在线播放| 欧洲国内综合视频| 日本高清无吗v一区| 97se亚洲国产综合自在线| 懂色av中文一区二区三区| 韩国午夜理伦三级不卡影院| 日本不卡视频一二三区| 日本欧美一区二区三区| 蜜桃视频在线观看一区| 久久aⅴ国产欧美74aaa| 韩国成人在线视频| 国产成人av电影在线播放| 国产999精品久久久久久| 丁香啪啪综合成人亚洲小说| 岛国一区二区在线观看| 国产91丝袜在线播放九色| 福利一区在线观看| 99久久99久久免费精品蜜臀| av不卡在线播放| 337p日本欧洲亚洲大胆色噜噜| 欧美久久一区二区| 精品日本一线二线三线不卡| 亚洲精品在线三区| 久久久国产精品麻豆| 国产精品久久久久久亚洲伦| 中文字幕一区二区三区视频 | 久久精品夜夜夜夜久久| 欧美高清在线一区| 有坂深雪av一区二区精品| 婷婷成人激情在线网| 久久综合综合久久综合| 国产乱码一区二区三区| 99精品久久久久久| 欧美日韩国产小视频在线观看| 日韩一区二区三区四区| 久久久久久免费网| 亚洲黄网站在线观看| 麻豆精品国产传媒mv男同| 成人av电影免费在线播放| 在线免费观看一区| 精品国产成人在线影院| 亚洲欧美一区二区视频| 日本欧美大码aⅴ在线播放| 风流少妇一区二区| 欧美无乱码久久久免费午夜一区| 欧美一区二区三区在线| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 国产精品一二二区| 91黄色免费看| 久久一区二区三区四区| 一区二区三区四区蜜桃| 狠狠色丁香久久婷婷综| 欧洲在线/亚洲| 久久精品视频在线看| 亚洲一区二区视频在线| 国产一区二区在线看| 欧美成人一区二区三区片免费| 久久奇米777| 亚洲福利国产精品| 成人免费福利片| 日韩欧美激情四射| 亚洲制服丝袜av| 成人的网站免费观看| 日韩欧美激情在线| 亚洲成av人片观看| 91免费视频观看| 亚洲国产激情av| 狠狠v欧美v日韩v亚洲ⅴ| 欧美日韩中文字幕一区| 亚洲天天做日日做天天谢日日欢| 精品亚洲porn| 欧美电视剧在线观看完整版| 亚洲成精国产精品女| 97精品久久久午夜一区二区三区| 精品日韩一区二区三区| 污片在线观看一区二区| 在线观看av一区二区| 亚洲视频狠狠干| 成人免费高清视频在线观看| 精品国产精品一区二区夜夜嗨| 日本成人在线不卡视频| 欧美精品丝袜中出| 亚洲电影第三页| 色琪琪一区二区三区亚洲区| 国产精品福利一区二区三区| 国产成人av一区二区三区在线| 精品国产一区二区三区忘忧草| 免费观看日韩av| 欧美电视剧免费全集观看| 美女一区二区三区在线观看| 日韩一区二区不卡|