Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
switch from Pan navigator to rubberband client side?
Rank: Member
Groups: Member
Joined: 11/1/2005(UTC) Posts: 8
|
I am making an image editor with the graphics mill for the web. When I seect the crop tool it works fine. When I select the Pan navigator adn then select the crop tool, the rubber band does not work - it will not allow me to create a rectangle. here is some of the code I am using: JAVASCRIPT: Code:// set the pan navigator
bitmapViewer1.setNavigator(PanNavigator1.id);
//set the crop
bitmapViewer1.setNavigator(null);
RubberBand1.setRectangle(new Rectangle(0,0,bitmapViewer1.bitmap.getWidth()/2-1,bitmapViewer1.bitmap.getHeight()/2-1));
bitmapViewer1.setNavigator(RubberBand1.id);
Objects Code:<aur:bitmapviewer id="BitmapViewer1"
runat="server"
ScrollBarsStyle="Auto"
ZoomQuality="Medium"
Height="345px"
Width="460px"
DebugFrameVisible="true"
BitmapStateEnabled="true"
BorderWidth="0"
BorderStyle="None"></aur:bitmapviewer>
<aur:pannavigator id="PanNavigator1" runat="server"></aur:pannavigator>
<aur:zoominnavigator id="ZoomInNavigator1" runat="server"></aur:zoominnavigator>
<aur:ZoomOutNavigator id="ZoomOutNavigator1" runat="server"></aur:ZoomOutNavigator>
<aur:zoomrectanglenavigator id="ZoomRectangleNavigator1" runat="server"/>
<aur:RectangleRubberband id="RubberBand1" runat="server" runat="server" GripsVisible="True" ></aur:RectangleRubberband>
Any Ideas? -Jason Edited by user Sunday, December 23, 2007 4:48:06 PM(UTC)
| Reason: Not specified |
|
|
|
|
Rank: Member
Groups: Member
Joined: 11/1/2005(UTC) Posts: 8
|
oops, I posted some test code, this is the real code I'm using for the crop:
bitmapViewer1.setNavigator(null); RubberBand1.setRectangle(new Rectangle(0,0,bitmapViewer1.bitmap.getWidth()/2-1,bitmapViewer1.bitmap.getHeight()/2-1)); RubberBand1.connect(bitmapViewer1.id) bitmapViewer1.setRubberband(RubberBand1.id) |
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration, Moderator Joined: 7/28/2003(UTC) Posts: 1,660
Thanks: 5 times Was thanked: 76 time(s) in 74 post(s)
|
Hello, I am sorry for delay. Could you post your entire code. I have used following code to test Rubberband with Pan Navigator working: Code:<%@ Page language="VB" AutoEventWireup="false" %>
<%@ Register TagPrefix="aur" Namespace="Aurigma.GraphicsMill.WebControls" Assembly="Aurigma.GraphicsMill.WebControls" %>
<HTML>
<HEAD>
<title>Aurigma Graphics Mill WebControls Remote Scripting</title>
<script language="VB" runat="server">
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not Page.IsPostBack Then
BitmapViewer1.Bitmap.Load(Server.MapPath("TestImages/building.jpg"))
End If
End Sub
</script>
<script>
function panChanged(enabled){
if(enabled){
bitmapViewer1.setNavigator(PanNavigator1.id);
}
else{
bitmapViewer1.setNavigator(null);
}
}
function rectangleChanged(enabled){
if(enabled){
RubberBand1.setRectangle(new Rectangle(0,0,bitmapViewer1.bitmap.getWidth()/2-1,bitmapViewer1.bitmap.getHeight()/2-1));
bitmapViewer1.setRubberband(RubberBand1.id);
}
else{
bitmapViewer1.setRubberband(null);
}
}
</script>
<LINK href="Style.css" type="text/css" rel="stylesheet"></LINK>
</HEAD>
<body style="OVERFLOW: hidden">
<form runat="server" ID="Form1">
<table>
<tr>
<td vAlign="top">
<aur:bitmapviewer id="bitmapViewer1" Runat="server" ScrollBarsStyle="Auto"
ZoomQuality="Medium" Height="345px" Width="460px" DebugFrameVisible="true"
BitmapStateEnabled="true" BorderWidth="0" BorderStyle="None" Zoom="2">
</aur:bitmapviewer>
<aur:pannavigator id="PanNavigator1" runat="server"></aur:pannavigator>
<aur:zoominnavigator id="ZoomInNavigator1" runat="server"></aur:zoominnavigator>
<aur:ZoomOutNavigator id="ZoomOutNavigator1" runat="server"></aur:ZoomOutNavigator>
<aur:zoomrectanglenavigator id="ZoomRectangleNavigator1" runat="server"/>
<aur:RectangleRubberband id="RubberBand1" runat="server" runat="server" GripsVisible="True" ></aur:RectangleRubberband>
</td>
<td valign="top">
<input type="checkbox" onchange="panChanged(this.checked)" id="inputPan">
<label for="inputPan">Pan Navigator</label>
<input type="checkbox" onchange="rectangleChanged(this.checked)" id="inputRectangle">
<label for="inputRectangle">Rectangle Rubberband</label>
</td>
</tr>
</table>
</form>
</body>
</HTML>
Edited by user Sunday, December 23, 2007 4:48:17 PM(UTC)
| Reason: Not specified |
Best regards, Fedor Skvortsov
|
|
|
|
Aurigma Forums
»
Graphics Mill
»
Discussions – Graphics Mill
»
switch from Pan navigator to rubberband client side?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.