Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   TDrawingPanel rotation (https://forums.graalonline.com/forums/showthread.php?t=134267036)

Emera 08-25-2012 05:28 PM

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?

fowlplay4 08-25-2012 05:55 PM

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.

Emera 08-25-2012 05:57 PM

Quote:

Originally Posted by fowlplay4 (Post 1702516)
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.


All times are GMT +2. The time now is 12:29 PM.

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