GUIサーバ高速化/05.部分描画実装(libbaygui)/変更点/生パッチ


Top / GUIサーバ高速化 / 05.部分描画実装(libbaygui) / 変更点 / 生パッチ
 Index: baygui/awt/Graphics.h
 ===================================================================
 --- baygui/awt/Graphics.h	(.../trunk/contrib/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3501)
 +++ baygui/awt/Graphics.h	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3537)
 @@ -176,6 +176,10 @@
  		 @param style ƒtƒHƒ“ƒgƒXƒ^ƒCƒ‹ (Font::PLAIN / Font::BOLD / Font::ITALIC / Font::FIXED )
  		*/
  		void setFontStyle(int style);
 +
 +		void drawImage(Image* image, int x, int y, int w, int h, int componentX, int componentY);
 +
 +	private:
  	};
  }
  
 Index: baygui/awt/Component.h
 ===================================================================
 --- baygui/awt/Component.h	(.../trunk/contrib/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3501)
 +++ baygui/awt/Component.h	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3537)
 @@ -97,6 +97,7 @@
  		
  		/** 遵。•`‰遵` */
  		virtual void repaint();
 +		virtual void repaint(int x, int y, int w, int h);
  		
  		/** •”•iXV */
  		virtual void update();
 Index: baygui/awt/Rectangle.h
 ===================================================================
 Index: awt/Graphics.cpp
 ===================================================================
 --- awt/Graphics.cpp	(.../trunk/contrib/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3501)
 +++ awt/Graphics.cpp	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇Iƒ潤齒・ƒ“醇I‚潤ッ醇Iƒ§醇Iƒ³ 3537)
 @@ -60,6 +60,16 @@
  		}
  	}
  
 +    void Graphics::drawImage(Image* image, int x, int y, int w, int h, int componentX, int componentY)
 +    {
 +        for (int i = 0; i < h; i++) {
 +            for (int j= 0; j < w; j++) {
 +                drawPixel(j + componentX + x, i + componentY + y, image->getPixel(j + x, i + y));
 +            }
 +        }
 +    }
 +
 +
  	void Graphics::drawLine(int x1, int y1, int x2, int y2)
  	{
  		int dx = (x1 > x2) ? (x1 - x2) : (x2 - x1);
 Index: awt/Component.cpp
 ===================================================================
 --- awt/Component.cpp	(.../trunk/contrib/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3501)
 +++ awt/Component.cpp	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3537)
 @@ -79,6 +79,13 @@
  		}
  	}
  
 +    void Component::repaint(int x, int y, int w, int h)
 +    {
 +        if (this->_buffer == NULL) return;
 +        update(x, y, w, h);
 +//        update();
 +    }
 +
  	void Component::repaint()
  	{
  		if (this->_buffer == NULL) return;
 @@ -89,16 +96,17 @@
  
  	void Component::update()
  	{
 -		update(getX(), getY(), getWidth(), getHeight());
 +        update(0, 0, getWidth(), getHeight());
  	}
  
  	void Component::update(int x, int y, int w, int h)
  	{
  		Frame* c = (Frame *)getMainWindow();
 -		c->getGraphics()->drawImage(this->_buffer, getX(), getY());
 -		c->update(c->getX() + c->getInsets()->left + x, c->getY() + c->getInsets()->top + y, w, h);
 +        c->getGraphics()->drawImage(this->_buffer, x, y, w, h, getX(), getY());
 +        c->update(c->getX() + c->getInsets()->left + x + getX(), c->getY() + c->getInsets()->top + y + getY(), w, h);
  	}
  
 +
  	Component* Component::getMainWindow()
  	{
  		return (this->parent == NULL) ? this : this->parent->getMainWindow();
 Index: awt/Window.cpp
 ===================================================================
 Index: awt/Container.cpp
 ===================================================================
 --- awt/Container.cpp	(.../trunk/contrib/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3501)
 +++ awt/Container.cpp	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3537)
 @@ -153,12 +153,9 @@
  	void Container::repaint()
  	{
  		if (getBuffer() == NULL) return;
 -		
  		paint(getGraphics());
 -
  		// 醇Q&#135;潤齒・&#136;&#134;醇I&#129;潤・・ &#152;醇H&#159;&#159;醇I&#130;&#146;遵`&#155;´遵`&#150;°醇I&#129;&#153;醇I&#130;&#139;
  		update();
 -
  		// 醇H&#173;&#144;醇P&#131;¨醇H&#147;&#129;醇I&#130;&#146;醇H&#134;&#141;遵`&#143;&#143;醇M&#148;&#187;醇I&#129;&#153;醇I&#130;&#139;
  		int I = this->componentList.size();
  		for(int i = 0; i < I; i++) {
 Index: Makefile
 ===================================================================
 --- Makefile	(.../trunk/contrib/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3501)
 +++ Makefile	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3537)
 @@ -1,6 +1,10 @@
  LIB_STATIC   = libbaygui.a
  TARGET       = $(LIB_STATIC)
  
 +ifndef $(MONADIR)
 +export MONADIR=$(PWD)/../../../mona
 +endif
 +
  include $(MONADIR)/share/configs/Makefile.inc
  include $(MONADIR)/share/configs/dirnames.inc
  include $(MONADIR)/share/configs/monapi.inc
 @@ -47,7 +51,7 @@
  ifneq ($(BUILD_TARGET),ELF)
  $(LIB_IMPORT): $(LIB_DYNAMIC)
  $(LIB_DYNAMIC): $(OBJECTS)
 -	$(LD) --export-all-symbols --out-implib $(LIB_IMPORT) -o $@ $(OBJECTS) -L$(MONADIR)/lib -lmonapi-imp
 +	$(LD) --export-all-symbols --out-implib $(LIB_IMPORT) -o $@ $(OBJECTS) -L$(MONADIR)/lib -lmonapi-imp -lmonalibc-imp
  	$(STRIP) $@
  
  $(LIB_DYNAMIC5): $(LIB_DYNAMIC)
 Index: BAYGUI.INI
 ===================================================================
 --- BAYGUI.INI	(.../trunk/contrib/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3501)
 +++ BAYGUI.INI	(.../branches/contrib-fast-gui/Graphics/libbaygui)	(醇I&#131;潤齒・&#131;&#147;醇I&#130;潤ッ醇I&#131;§醇I&#131;&#179; 3537)
 @@ -1,5 +1,5 @@
  [General]
 -Run=/APPS/BAYGUI/GLAUNCH.EX5
 +Run=/APPS/BAYGUI/TEST.EX5,/APPS/BAYGUI/GLAUNCH.EX5
  
  [Wallpaper]
  Source=/APPS/MONAWALL.BM5

MENU

now: 9

リンク


最新の20件
2018-10-07 2018-09-20 2018-09-03 2018-05-09 2017-09-29 2017-01-10 2016-12-11 2016-10-04 2016-08-14 2016-05-29 2015-12-28 2013-02-25 2013-02-21 2013-02-20 2013-02-12 2013-02-11 2013-02-10
最新の20件
2010-02-01 2010-01-31 2010-01-30 2010-01-29 2010-01-16

Counter: 2015, today: 1, yesterday: 1

リロード   新規 編集 凍結 差分 添付 複製 改名   トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Last-modified: 2008-03-28 (金) 15:47:54 (3887d);  Modified by mona
PukiWiki 1.4.6 Copyright © 2001-2005 PukiWiki Developers Team. License is GPL.
Based on "PukiWiki" 1.3 by yu-ji
Powered by PHP 5.2.17
HTML convert time to 0.070 sec.