Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 08-25-2012, 05:28 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
TDrawingPanel rotation

hey, I've been trying to draw images to a TDrawingPanel and have them rotate before saving, but I can't figure out how to do it. Is it even possible?
Reply With Quote
  #2  
Old 08-25-2012, 05:55 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
You can't rotate the panel but you can rotate other objects (i.e. showimg object) and draw them on to the panel:

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
temp.obj findimg(200);
  
with (temp.obj) {
    
image "block.png";
    
rotation pi;
  }
  new 
GuiWindowCtrl(RotateExample) {
    
width height 200;
    new 
GuiDrawingPanel(RotateExamplePanel) {
      
7;
      
25;
      
width height 190;
      
clearall();
      
drawobject(3030temp.obj);
    }
  }
  
hideimg(200);

Through clever use of saveimage and findimg, you could rotate the whole panel.
__________________
Quote:
Reply With Quote
  #3  
Old 08-25-2012, 05:57 PM
Emera Emera is offline
Delterian Hybrid
Emera's Avatar
Join Date: Mar 2011
Location: Newcastle Upon-Tyne
Posts: 1,704
Emera is a jewel in the roughEmera is a jewel in the rough
Quote:
Originally Posted by fowlplay4 View Post
You can't rotate the panel but you can rotate other objects (i.e. showimg object) and draw them on to the panel:

PHP Code:
//#CLIENTSIDE

function onCreated() {
  
temp.obj findimg(200);
  
with (temp.obj) {
    
image "block.png";
    
rotation pi;
  }
  new 
GuiWindowCtrl(RotateExample) {
    
width height 200;
    new 
GuiDrawingPanel(RotateExamplePanel) {
      
7;
      
25;
      
width height 190;
      
clearall();
      
drawobject(3030temp.obj);
    }
  }
  
hideimg(200);

Thanks. This is exactly what I was looking for.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 10:54 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.