AVAX-software.com Forums: Problems with block colour lines - AVAX-software.com Forums

Jump to content

Page 1 of 1

Problems with block colour lines All colour lines of blocks changes to black!

#1 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 30 August 2007 - 11:03 AM

All colour lines of blocks changes to black when I modify their properties (SetProperties) when the blocks are not visible on the screen.

On the first sample picture appears original block, with true colour lines.
On the second image appears same block after a mirror operation, with an incorrect colour lines. The mirror operation became while the block was not visible on the screen (using scroll).


Thanks,
Andreu.

Attached thumbnail(s)

  • Attached Image
  • Attached Image


#2 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 14 September 2007 - 09:50 AM

We have fixed that bug. Please download the latest AVAX version.
Athanasios Gardos
Avax-Software.com

#3 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 04 October 2007 - 11:34 AM

I tested the latest Avax version (v.1.3.77, 14-SEP-2007), but the problem remains...

#4 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 08 October 2007 - 08:42 AM

I' ll see it again.
Athanasios Gardos
Avax-Software.com

#5 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 08 October 2007 - 04:22 PM

Thanks.

#6 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 07 November 2007 - 12:37 PM

I sent you an e-mail explaining the problem...

#7 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 07 November 2007 - 05:33 PM

OK
Athanasios Gardos
Avax-Software.com

#8 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 12 November 2007 - 10:12 AM

Every time you are using SetProperties to a line AVAX makes a new line object with a rendering order grater than the rendering order of the blocks. The idea is to use command SetProperties to the blocks too. By this way AVAX will render blocks after the lines. See the following VB6 example:

Option Explicit

Dim hLine As Long
Dim hBlock As Long

Private Sub Command1_Click()
	Dim h() As Long, iType() As AvaxItemType, vProp() As Variant, vData() As Variant
	Dim xyz() As Single
	ReDim h(1) As Long
	h(1) = hLine
	cAvax1.AutoRedraw = False
	If cAvax1.GetProperties(h(), iType(), vProp(), vData()) = True Then
	   xyz() = vData(1)
	   xyz(1) = xyz(1) + 1
	   xyz(2) = xyz(2) + 1
	   vData(1) = xyz()
	   Call cAvax1.SetProperties(h(), iType(), vProp(), vData())
	   hLine = cAvax1.LastHandle
	End If
	Call SetPropertiesToTheBlock
	cAvax1.AutoRedraw = True
End Sub

Private Sub SetPropertiesToTheBlock()
	Dim h() As Long, iType() As AvaxItemType, vProp() As Variant, vData() As Variant
	Dim xyz() As Single
	ReDim h(1) As Long
	h(1) = hBlock
	If cAvax1.GetProperties(h(), iType(), vProp(), vData()) = True Then
	   Call cAvax1.SetProperties(h(), iType(), vProp(), vData())
	   hBlock = cAvax1.LastHandle
	End If
End Sub

Private Sub Form_Load()
	Dim Fill_Flags As Long, h() As Long
	Dim hShape As Long
	Command1.Caption = "Set properties to the Line"
	Call cAvax1.StartAvax
	Call cAvax1.SetAvaxProperty(CheckBackColorOn_p, False)
	Call cAvax1.DirsSet("", "", App.Path & "\", "")
	hLine = cAvax1.Add_Line(5, -5, 0, 5, 10, 0, , cAvax1.NearestPaletteIndexColor(vbBlack))
	Fill_Flags = cAvax1.CreatePatternFlags(, , , True)
	hShape = cAvax1.Add_ShapeRectangle(0, 0, 20, 5, , , , cAvax1.NearestPaletteIndexColor(vbWhite), 0, , , Fill_Flags, , 2)
	ReDim h(1) As Long
	h(1) = hShape
	If cAvax1.CreateBlock(h(), "test", 0, 0) = True Then
	   hBlock = cAvax1.LastHandle
	End If
	cAvax1.Command = AutoLimits_c
End Sub

Private Sub Form_Unload(Cancel As Integer)
	Call cAvax1.EndAvax
End Sub

Athanasios Gardos
Avax-Software.com

#9 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 12 November 2007 - 05:09 PM

Thanks, we already are applying this method to solve the problem of ZOrder.
But the problem that we realy fail to solve is the loss of the block colour lines after aplying SetProperties.
I apply SetProperties to all blocks. But all colour lines of blocks changes to black when the blocks are not visible on the screen!
I tested it on the latest Avax version v.1.3.77 (14-SEP-2007).

Attached thumbnail(s)

  • Attached Image
  • Attached Image
  • Attached Image


#10 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 31 December 2007 - 10:00 AM

Hi!

This is an example code in .NET:

	Public Sub BringToFront_AllBlocks()
		'
		'   Set all existing blocks to front from the drawing
		'

		'Local declarations
		Dim AllHandles() As Integer
		Dim AvaxType() As Avax.AvaxItemType
		Dim objProp() As Object
		Dim objData() As Object

		'Obtain all existing blocks properties
		If AxcAvax1.GetAllHandlesArr(AllHandles, Avax.AvaxItemType.Block_i, False) < 1 Then
			Exit Sub
		End If
		If Not AxcAvax1.GetProperties(AllHandles, AvaxType, objProp, objData) Then
			Exit Sub
		End If

		'AVAX BUG on "SetProperties" of blocks:
		'if these are not visible on the screen the original colour lines losts! And all colour lines of blocks changes to black!
		'To avoid this situation, we previously do "ZoomExtends", and after "SetProperties" back to the initial zoom view.
		Dim MaxXMin, MaxYMin, MaxXMax, MaxYMax As Single
		Dim ActualXMin, ActualYMin, ActualXMax, ActualYMax As Single
		AxcAvax1.GetBoundsDrawing(MaxXMin, MaxYMin, Nothing, MaxXMax, MaxYMax, Nothing) 'maximum bounds of drawing area
		AxcAvax1.GetBoundsZoom(ActualXMin, ActualYMin, ActualXMax, ActualYMax) 'actual zoom position
		If ActualXMin > MaxXMin Or ActualYMin > MaxYMin Or ActualXMax < MaxXMax Or ActualYMax < MaxYMax Then 'if all drawing are not visible
			AxcAvax1.Command = 84 'zoom extends
		End If
 
		'Set all blocks properties to do "BringToFront"
		AxcAvax1.SetProperties(AllHandles, AvaxType, objProp, objData)
 
		'AVAX BUG on "SetProperties" of blocks: set to original zoom view
		If ActualXMin > MaxXMin Or ActualYMin > MaxYMin Or ActualXMax < MaxXMax Or ActualYMax < MaxYMax Then ' if all drawing was not visible
			AxcAvax1.SetBoundsZoom(ActualXMin, ActualYMin, ActualXMax, ActualYMax) 'set to original zoom view
		End If

	End Sub


To avoid this Avax bug, we must previously do “ZoomExtends” and after “SetProperties” we set zoom to original view.

Thanks,
Andreu.

#11 User is offline   Athanasios Gardos Icon

  • Administrator
  • Icon
  • Group: Admin
  • Posts: 333
  • Joined: 21-March 05
  • Gender:Male

Posted 27 February 2008 - 02:24 PM

We have fixed the bug. Please download the latest AVAX version.
Athanasios Gardos
Avax-Software.com

#12 User is offline   Andreu Icon

  • Member
  • PipPip
  • Group: Members
  • Posts: 23
  • Joined: 03-October 06

Posted 18 March 2008 - 09:13 AM

OK. Thanks!

Page 1 of 1


Fast Reply

  

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users