当前位置: 首页>>代码示例>>C++>>正文


C++ BView::SetPenSize方法代码示例

本文整理汇总了C++中BView::SetPenSize方法的典型用法代码示例。如果您正苦于以下问题:C++ BView::SetPenSize方法的具体用法?C++ BView::SetPenSize怎么用?C++ BView::SetPenSize使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在BView的用法示例。


在下文中一共展示了BView::SetPenSize方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: DrawThumb

void APPosSlider::DrawThumb(void)
{
	BRect rect;
	BView *view;

	// Get the frame rectangle of the thumb
	// and the offscreen view
	rect = ThumbFrame();
	view = OffscreenView();

	// Draw the black shadow
	view->SetDrawingMode(B_OP_ALPHA);
	rgb_color c = BeDarkShadow;
	c.alpha = 128;
	view->SetHighColor(c);
	rect.top++;
	rect.left++;
	view->FillEllipse(rect);
	
	// Fill the inside of the thumb
	view->SetDrawingMode(B_OP_COPY);
	view->SetHighColor(BeButtonGrey);
	rect.OffsetBy(-1, -1);
	view->FillEllipse(rect);

	// Draw the dark grey edge
	view->SetHighColor(86, 86, 86, 255); // TODO : use an Haiku define to get that ?
	view->SetPenSize(1.2);
	view->StrokeEllipse(rect);


}
开发者ID:pulkomandy,项目名称:APlayer,代码行数:32,代码来源:APPosSlider.cpp

示例2: CreateIcon

BBitmap* MainView::CreateIcon(const rgb_color colorIn)
{
	BRect rect(0, 0, 15, 15);
	BBitmap* toReturn = new BBitmap(rect, B_CMAP8, true);
	BView* drawing = new BView(rect, 
								"drawer", 
								B_FOLLOW_LEFT | B_FOLLOW_TOP,
								B_WILL_DRAW);
	if (!drawing || !toReturn) { return NULL; }	
	toReturn->AddChild(drawing);
	if (toReturn->Lock()) {
		drawing->SetHighColor(kWhite);
		drawing->FillRect(rect);
		drawing->SetHighColor(kBlack);
		drawing->SetPenSize(1);
		drawing->StrokeRect(rect);
		drawing->SetHighColor(colorIn);
		drawing->FillRect(rect.InsetBySelf(1, 1));
		drawing->Sync();
		toReturn->Unlock();			
	}
	toReturn->RemoveChild(drawing);
	delete drawing;
	return toReturn;
}
开发者ID:BackupTheBerlios,项目名称:haiku-pim-svn,代码行数:25,代码来源:clsMainWindow.cpp

示例3: CreateIcon

/*!
 *	\brief		Create the square icon filled with submitted color.
 *	\param[in]	color		The color of the requested icon.
 *	\param[in]	toChange	If there is an allocated item, it may be changed.
 *							If the submitted pointer is not NULL (which is default),
 *							this BBitmap is tested for dimensions match, and if dimensions
 *							allow, its contents are replaced with new icon. Else, old icon
 *							is deleted, and a new is created. In this case, both the
 *							"toChange" pointer and returned pointer point to the same
 *							BBitmap. 
 */
BBitmap* CategoryMenuItem::CreateIcon(const rgb_color colorIn, BBitmap* toChange )
{
	font_height fh;
	BFont plainFont( be_plain_font );
	plainFont.GetHeight( &fh );
	
	int squareSize = ceilf( fh.ascent + fh.descent + fh.leading - 2 );	//!< Side of the square.
	BRect rect(0, 0, squareSize, squareSize );
	BBitmap* toReturn = NULL;
	if ( !toChange )	// Checking availability of the input
	{
		toReturn = new BBitmap(rect, B_RGB32, true);
	} else {
		// It would be a good idea to check also the color space,
		// but it may be changed by the BBitmap itself, so...
		if ( ceilf ( ( toChange->Bounds() ).Width() ) != squareSize )
		{
			delete toChange;
			toChange = new BBitmap(rect, B_RGB32, true);
			if ( !toChange )
			{
				/* Panic! */
				exit(1);
			}			
		}
		toReturn = toChange;
	}
	
	BView* drawing = new BView( rect, 
								"Drawer", 
								B_FOLLOW_LEFT | B_FOLLOW_TOP,
								B_WILL_DRAW);
	if (!drawing || !toReturn) { return NULL; }	
	toReturn->AddChild(drawing);
	if (toReturn->Lock()) {
		
		// Clean the area
		drawing->SetHighColor( ui_color( B_DOCUMENT_BACKGROUND_COLOR ) );
		drawing->FillRect(rect);
		
		// Draw the black square
		drawing->SetHighColor( ui_color( B_DOCUMENT_TEXT_COLOR ) );
		drawing->SetPenSize(1);
		drawing->StrokeRect(rect);
		
		// Fill the inside of the square
		drawing->SetHighColor( colorIn );
		drawing->FillRect(rect.InsetBySelf(1, 1));
		
		// Flush the actions to BBitmap
		drawing->Sync();
		toReturn->Unlock();
	}
	toReturn->RemoveChild(drawing);			// Cleanup
	delete drawing;
	return toReturn;
}	// <-- end of function CategoryMenuItem::CreateIcon
开发者ID:HaikuArchives,项目名称:Eventual,代码行数:68,代码来源:CategoryItem.cpp

示例4: Read

status_t
CanvasMessage::ReadViewState(BView& view, ::pattern& pattern)
{
	bool subPixelPrecise;
	float penSize, miterLimit;
	drawing_mode drawingMode;
	source_alpha sourceAlpha;
	alpha_function alphaFunction;
	cap_mode capMode;
	join_mode joinMode;
	rgb_color highColor, lowColor;

	Read(penSize);
	Read(subPixelPrecise);
	Read(drawingMode);
	Read(sourceAlpha);
	Read(alphaFunction);
	Read(pattern);
	Read(capMode);
	Read(joinMode);
	Read(miterLimit);
	Read(highColor);
	status_t result = Read(lowColor);
	if (result != B_OK)
		return result;

	uint32 flags = view.Flags() & ~B_SUBPIXEL_PRECISE;
	view.SetFlags(flags | (subPixelPrecise ? B_SUBPIXEL_PRECISE : 0));
	view.SetPenSize(penSize);
	view.SetDrawingMode(drawingMode);
	view.SetBlendingMode(sourceAlpha, alphaFunction);
	view.SetLineMode(capMode, joinMode, miterLimit);
	view.SetHighColor(highColor);
	view.SetLowColor(lowColor);
	return B_OK;
}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:36,代码来源:CanvasMessage.cpp

示例5: ceilf

/*!	\function	CategoryMenuItem::CreateIcon
 *	\brief		Create the square icon filled with submitted color.
 *	\param[in]	color		The color of the requested icon.
 *	\param[in]	toChange	If there is an allocated item, it may be changed.
 *							If the submitted pointer is not NULL (which is default),
 *							this BBitmap is tested for dimensions match, and if dimensions
 *							allow, its contents are replaced with new icon. Else, old icon
 *							is deleted, and a new is created. In this case, both the
 *							"toChange" pointer and returned pointer point to the same
 *							BBitmap.
 */
BBitmap*	CategoryMenuItem::CreateIcon( const rgb_color color,
										  BBitmap* toChange )
{
	BBitmap* toReturn = NULL;	//!< This is the value to be returned.
	BRect tempRect;
	float width, height, squareSide;
	
	// Get size of the square
	this->GetContentSize( &width, &height );
	squareSide = ceilf( height ) - 2;
	
	// Compare submitted bitmap to calculated size
	if ( toChange )
	{
		tempRect = toChange->Bounds();
		if ( ( tempRect.Width() != squareSide ) ||
			 ( tempRect.Height() != squareSide ) )
		{
			// Dimensions don't match - need to delete the bitmap and reallocate it
			delete toChange;
			tempRect.Set( 0, 0, squareSide, squareSide );
			toChange = new BBitmap( tempRect, B_RGB32, true );
			if ( !toChange )
			{
				/* Panic! */
				exit(1);
			}
			
			toReturn = toChange;
		}
		else
		{
			/*!	\note	Note about color spaces
			 *			Actually, even if the dimensions are correct, the existing
			 *			BBitmap may be not suitable due to incorrect color space.
			 *			However, BBitmap may change the color space on its own, (and
			 *			probably will, since there's no much sense in having 32 bits
			 *			per pixel for bitmap with only 2 colors - black for the frame
			 *			and Category's color for the inside). Therefore, color space is
			 *			not checked. It's assumed that existing color space is good enough.
			 */
			// Dimensions match, color space is not checked - continuing
			toReturn = toChange;
		}
	}
	else	// No bitmap is submitted
	{
		toReturn = new BBitmap( tempRect, B_RGB32, true );
		if ( !toReturn )
		{
			/* Panic! */
			exit(1);
		}
	}
	
	/* Here toReturn is already set. */
	
	// Add the drawing view to the bitmap
	tempRect.Set( 0, 0, squareSide, squareSide );
	BView* drawing = new BView (tempRect,
								"Drawer", 
								B_FOLLOW_LEFT | B_FOLLOW_TOP,
								B_WILL_DRAW);
	if (!drawing || !toReturn) {
		/* Panic! */
		return NULL;
	}	
	toReturn->AddChild(drawing);
	if (toReturn->Lock()) {

		// Clean the area
		drawing->SetHighColor( ui_color( B_MENU_BACKGROUND_COLOR ) );
		drawing->FillRect( tempRect );
		
		// Draw the black square
		drawing->SetHighColor( ui_color( B_MENU_ITEM_TEXT_COLOR ) );
		drawing->SetPenSize( 1 );
		drawing->StrokeRect( tempRect );
		
		// Fill the inside of the square
		drawing->SetHighColor( color );
		drawing->FillRect( tempRect.InsetBySelf( 1, 1 ) );
		
		// Flush the actions to BBitmap
		drawing->Sync();
		toReturn->Unlock();	
	}

	toReturn->RemoveChild( drawing );
//.........这里部分代码省略.........
开发者ID:BackupTheBerlios,项目名称:haiku-pim-svn,代码行数:101,代码来源:CategoryItem.cpp

示例6: MessageReceived


//.........这里部分代码省略.........
			if ( ! messageToSend )
			{
				if ( this->dirty )
				{
					this->messageToSend = new BMessage( kColorSelected );
				} else {
					this->messageToSend = new BMessage( kColorReverted );
				}
				if ( ! this->messageToSend ) {
					/* Panic! */
					exit(1);
				}
			}
			
			// Stuff the message with needed data
			messageToSend->AddBool( "Dirty", this->dirty );
			messageToSend->AddString ( "Original string", this->originalString );
			if ( this->dirty ) {
				messageToSend->AddString("New string", currentString );
			}

			messageToSend->AddInt32( "Original color", RepresentColorAsUint32( this->originalColor ) );
			messageToSend->AddInt32( "New color", RepresentColorAsUint32( this->currentColor ) );
			
			// Send the message and close current window
			// mesg = new BMessenger( (BHandler* )target, NULL,  &errorCode );
			mesg = new BMessenger( "application/x-vnd.Hitech.Skeleton", -1, &errorCode );
			
			if ( errorCode == B_OK ) {
				
				mesg->SendMessage( messageToSend, ( BHandler* )NULL );
				
				deb = new DebuggerPrintout( "Message was sent" );
			} else {
				deb = new DebuggerPrintout( "Message wasn't sent" );
			}
			
			this->Quit();
			
			break;

		case kColorReverted:
			/* Returning to original settings */
			if ( colorControl )
			{
				colorControl->SetValue( originalColor );
				colorControl->Invoke();
			}

			if ( enableEditingLabel && this->labelView )
			{
				( (BTextControl*)this->labelView )->SetText( this->originalString.String() );
				( (BTextControl*)this->labelView )->MakeFocus( false );	// Prevent accidental change of text
			}
			
			break;
			
		case kColorChanged:
		
			// We need to reflect the change in color.
			// We'll do it using the current view's high color. For this, we need to
			// back up current high color in order to restore it later.
			background = this->FindView( "Background" );
			if ( ! background )
			{
				deb = new DebuggerPrintout( "Didn't find background!" );
				return;
			}
			previousHighColor = background->HighColor();

			background->SetHighColor( 0, 0, 1 );	// almost black
			
			tempRect = BRect( ( revertButton->Frame() ).right + 10,
							  ( revertButton->Frame() ).top,
							  ( okButton->Frame() ).left - 10,
							  ( revertButton->Frame() ).bottom );

			// Actual drawing
			if ( this->Lock() ) {
				background->SetPenSize( 1 );
				
				// Create border
				background->StrokeRoundRect( tempRect.InsetBySelf( 1, 1 ), 4, 4 );
				
				// Fill the rectangle
				background->SetHighColor( colorControl->ValueAsColor() );
				background->FillRoundRect( tempRect.InsetBySelf( 1, 1 ), 4, 4 );
				background->Flush();
				this->Flush();
				this->Unlock();	
			}		

			background->SetHighColor( previousHighColor );
			break;

		default:
			BWindow::MessageReceived( in );
	};
	
}	// <-- end of function "ColorUpdateWindow::MessageReceived"
开发者ID:BackupTheBerlios,项目名称:haiku-pim-svn,代码行数:101,代码来源:CategoryItem.cpp

示例7: reply


//.........这里部分代码省略.........

			case RP_SET_OFFSETS:
			{
				int32 xOffset, yOffset;
				message.Read(xOffset);
				if (message.Read(yOffset) != B_OK)
					continue;

				offscreen->MovePenTo(xOffset, yOffset);
				break;
			}

			case RP_SET_HIGH_COLOR:
			case RP_SET_LOW_COLOR:
			{
				rgb_color color;
				if (message.Read(color) != B_OK)
					continue;

				if (code == RP_SET_HIGH_COLOR)
					offscreen->SetHighColor(color);
				else
					offscreen->SetLowColor(color);

				break;
			}

			case RP_SET_PEN_SIZE:
			{
				float newPenSize;
				if (message.Read(newPenSize) != B_OK)
					continue;

				offscreen->SetPenSize(newPenSize);
				penSize = newPenSize / 2;
				break;
			}

			case RP_SET_STROKE_MODE:
			{
				cap_mode capMode;
				join_mode joinMode;
				float miterLimit;

				message.Read(capMode);
				message.Read(joinMode);
				if (message.Read(miterLimit) != B_OK)
					continue;

				offscreen->SetLineMode(capMode, joinMode, miterLimit);
				break;
			}

			case RP_SET_BLENDING_MODE:
			{
				source_alpha sourceAlpha;
				alpha_function alphaFunction;

				message.Read(sourceAlpha);
				if (message.Read(alphaFunction) != B_OK)
					continue;

				offscreen->SetBlendingMode(sourceAlpha, alphaFunction);
				break;
			}
开发者ID:veer77,项目名称:Haiku-services-branch,代码行数:66,代码来源:RemoteView.cpp

示例8: rightRect

void
TouchpadView::DrawSliders()
{
	BView* view;
	if (fOffScreenView != NULL)
		view = fOffScreenView;
	else
		view = this;

	if (!LockLooper())
		return;

	if (fOffScreenBitmap->Lock()) {
		view->SetHighColor(ui_color(B_PANEL_BACKGROUND_COLOR));
		view->FillRect(Bounds());
		view->SetHighColor(100, 100, 100);
		view->FillRoundRect(fPadRect, 4, 4);

		int32 dragSize = 3; // half drag size

		// scroll areas
		view->SetHighColor(145, 100, 100);
		BRect rightRect(fPadRect.left + fXScrollRange,  fPadRect.top,
			fPadRect.right, fPadRect.bottom);
		view->FillRoundRect(rightRect, 4, 4);

		BRect bottomRect(fPadRect.left, fPadRect.top + fYScrollRange,
			fPadRect.right, fPadRect.bottom);
		view->FillRoundRect(bottomRect, 4, 4);

		// Stroke Rect
		view->SetHighColor(100, 100, 100);
		view->SetPenSize(2);
		view->StrokeRoundRect(fPadRect, 4, 4);

		// x scroll range line
		view->SetHighColor(200, 0, 0);
		view->StrokeLine(BPoint(fPadRect.left + fXScrollRange, fPadRect.top),
			BPoint(fPadRect.left + fXScrollRange, fPadRect.bottom));

		fXScrollDragZone = BRect(fPadRect.left + fXScrollRange - dragSize,
			fPadRect.top - dragSize, fPadRect.left + fXScrollRange + dragSize,
			fPadRect.bottom + dragSize);
		fXScrollDragZone1 = BRect(fPadRect.left + fXScrollRange - dragSize,
			fPadRect.top - dragSize, fPadRect.left + fXScrollRange + dragSize,
			fPadRect.top + dragSize);
		view->FillRect(fXScrollDragZone1);
		fXScrollDragZone2 = BRect(fPadRect.left + fXScrollRange - dragSize,
			fPadRect.bottom - dragSize,
			fPadRect.left + fXScrollRange + dragSize,
			fPadRect.bottom + dragSize);
		view->FillRect(fXScrollDragZone2);

		// y scroll range line
		view->StrokeLine(BPoint(fPadRect.left, fPadRect.top + fYScrollRange),
			BPoint(fPadRect.right, fPadRect.top  + fYScrollRange));

		fYScrollDragZone = BRect(fPadRect.left - dragSize,
			fPadRect.top + fYScrollRange - dragSize,
			fPadRect.right  + dragSize,
			fPadRect.top + fYScrollRange + dragSize);
		fYScrollDragZone1 = BRect(fPadRect.left - dragSize,
			fPadRect.top + fYScrollRange - dragSize, fPadRect.left  + dragSize,
			fPadRect.top + fYScrollRange + dragSize);
		view->FillRect(fYScrollDragZone1);
		fYScrollDragZone2 = BRect(fPadRect.right - dragSize,
			fPadRect.top + fYScrollRange - dragSize, fPadRect.right  + dragSize,
			fPadRect.top + fYScrollRange + dragSize);
		view->FillRect(fYScrollDragZone2);

		fOffScreenView->Sync();
		fOffScreenBitmap->Unlock();
		DrawBitmap(fOffScreenBitmap, B_ORIGIN);
	}

	UnlockLooper();
}
开发者ID:mariuz,项目名称:haiku,代码行数:77,代码来源:TouchpadPrefView.cpp

示例9: _

void
ActivityView::_DrawHistory(bool drawBackground)
{
	_UpdateOffscreenBitmap();

	BView* view = this;
	if (fOffscreen != NULL) {
		fOffscreen->Lock();
		view = _OffscreenView();
	}

	BRect frame = _HistoryFrame();
	BRect outerFrame = frame.InsetByCopy(-2, -2);

	// draw the outer frame
	uint32 flags = 0;
	if (!drawBackground)
		flags |= BControlLook::B_BLEND_FRAME;
	be_control_look->DrawTextControlBorder(this, outerFrame,
		outerFrame, fLegendBackgroundColor, flags);

	// convert to offscreen view if necessary
	if (view != this)
		frame.OffsetTo(B_ORIGIN);

	view->SetLowColor(fHistoryBackgroundColor);
	view->FillRect(frame, B_SOLID_LOW);

	uint32 step = 2;
	uint32 resolution = fDrawResolution;
	if (fDrawResolution > 1) {
		step = 1;
		resolution--;
	}

	uint32 width = frame.IntegerWidth() - 10;
	uint32 steps = width / step;
	bigtime_t timeStep = RefreshInterval() * resolution;
	bigtime_t now = system_time();

	// Draw scale
	// TODO: add second markers?

	view->SetPenSize(1);

	rgb_color scaleColor = view->LowColor();
	uint32 average = (scaleColor.red + scaleColor.green + scaleColor.blue) / 3;
	if (average < 96)
		scaleColor = tint_color(scaleColor, B_LIGHTEN_2_TINT);
	else
		scaleColor = tint_color(scaleColor, B_DARKEN_2_TINT);

	view->SetHighColor(scaleColor);
	view->StrokeLine(BPoint(frame.left, frame.top + frame.Height() / 2),
		BPoint(frame.right, frame.top + frame.Height() / 2));

	// Draw values

	view->SetPenSize(1.5);
	BAutolock _(fSourcesLock);

	for (uint32 i = fSources.CountItems(); i-- > 0;) {
		ViewHistory* viewValues = fViewValues.ItemAt(i);
		DataSource* source = fSources.ItemAt(i);
		DataHistory* values = fValues.ItemAt(i);

		viewValues->Update(values, steps, fDrawResolution, now, timeStep,
			RefreshInterval());

		uint32 x = viewValues->Start() * step;
		BShape shape;
		bool first = true;

		for (uint32 i = viewValues->Start(); i < steps; x += step, i++) {
			float y = _PositionForValue(source, values,
				viewValues->ValueAt(i));

			if (first) {
				shape.MoveTo(BPoint(x, y));
				first = false;
			} else
				shape.LineTo(BPoint(x, y));
		}

		view->SetHighColor(source->Color());
		view->SetLineMode(B_BUTT_CAP, B_ROUND_JOIN);
		view->MovePenTo(B_ORIGIN);
		view->StrokeShape(&shape);
	}

	// TODO: add marks when an app started or quit
	view->Sync();
	if (fOffscreen != NULL) {
		fOffscreen->Unlock();
		DrawBitmap(fOffscreen, outerFrame.LeftTop());
	}
}
开发者ID:Barrett17,项目名称:haiku-contacts-kit-old,代码行数:97,代码来源:ActivityView.cpp

示例10: _InitWindow


//.........这里部分代码省略.........
		inputHeight->SetViewColor(200,200,200,255);
		inputHeight->SetDrawingMode(B_OP_OVER);

//		(inputHeight->TextView())->MakeEditable(false);
		pictureSizeView->AddChild(label2);
		pictureSizeView->AddChild(inputWidth);
		pictureSizeView->AddChild(unit2);
		inputWidth->SetViewColor(200,200,200,255);
		inputWidth->SetDrawingMode(B_OP_OVER);

//		(inputWidth->TextView())->MakeEditable(false);
		//---Originalgrößen View---

		//+++Neue Größe View+++
		BRect newPictureSize = background;
		newPictureSize.top=(pictureSize.bottom+3);
		newPictureSize.bottom -=50;
		BBox *newPictureSizeView=new BBox(newPictureSize,"pictureView2",B_FOLLOW_BOTTOM|B_FOLLOW_LEFT_RIGHT);
		newPictureSizeView->SetLabel(new BStringView(BRect(10,0,50,20),"Label","Neue Größe:"));
		outputWidth=new BTextControl(BRect(5,15,newPictureSize.Width()-80,20),"oWidth","Width:","",new BMessage(OUTPUT_WIDTH_CHANGED),B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED);
		outputHeight=new BTextControl(BRect(5,35,newPictureSize.Width()-80,20),"oHeight","Height:","",new BMessage(OUTPUT_HEIGHT_CHANGED),B_FOLLOW_ALL_SIDES, B_WILL_DRAW|B_PULSE_NEEDED);


		//Die Maseinheiten auswahl...
		BMenu *messureMenu=new BMenu("px",B_ITEMS_IN_COLUMN);
		messureMenu->SetRadioMode(true);
		messureMenu->SetLabelFromMarked(true);
		messureMenu->AddItem(item=new BMenuItem("px",new BMessage(MESSURE_MENU_PIXEL)));
		item->SetMarked(true);
		messureMenu->AddItem(item=new BMenuItem("%",new BMessage(MESSURE_MENU_PERCENT)));
		BMenuField *messureKind=new BMenuField(BRect(newPictureSize.Width()-40,25,newPictureSize.Width()-5,40),"messureKind",NULL,messureMenu,B_FOLLOW_BOTTOM|B_FOLLOW_RIGHT);
		
		BRect rect=BRect(newPictureSize.Width()-75,20,newPictureSize.Width()-45,50);
		BView *tmpView = new BView(rect, "temp", B_FOLLOW_NONE, B_WILL_DRAW );
 			
		// der Verknüpfungsknop
		AddChild(tmpView);
		//create on picture
		rgb_color back=backView->ViewColor();
		//back.alpha=255;
	   	BPicture *on;
 		tmpView->BeginPicture(new BPicture); 
			tmpView->SetHighColor(back);
 			tmpView->FillRect(tmpView->Bounds());
			tmpView->BeginLineArray(7);
				tmpView->AddLine(BPoint(0,3),BPoint(15,3),black);
				tmpView->AddLine(BPoint(0,3),BPoint(5,0),black);
				tmpView->AddLine(BPoint(0,3),BPoint(5,6),black);
				tmpView->AddLine(BPoint(15,3),BPoint(15,27),black);
				tmpView->AddLine(BPoint(0,27),BPoint(15,27),black);
				tmpView->AddLine(BPoint(0,27),BPoint(5,24),black);
				tmpView->AddLine(BPoint(0,27),BPoint(5,30),black);
			tmpView->EndLineArray();
 			on = tmpView->EndPicture();
   			//create off picture
   			BPicture *off;
   			tmpView->BeginPicture(new BPicture); 
			tmpView->SetHighColor(back);
			tmpView->FillRect(tmpView->Bounds());
			tmpView->BeginLineArray(8);
				tmpView->AddLine(BPoint(0,3),BPoint(15,3),black);
				tmpView->AddLine(BPoint(0,3),BPoint(5,0),black);
				tmpView->AddLine(BPoint(0,3),BPoint(5,6),black);
				tmpView->AddLine(BPoint(15,3),BPoint(15,10),black);
				tmpView->AddLine(BPoint(15,20),BPoint(15,27),black);
				tmpView->AddLine(BPoint(0,27),BPoint(15,27),black);
				tmpView->AddLine(BPoint(0,27),BPoint(5,24),black);
				tmpView->AddLine(BPoint(0,27),BPoint(5,30),black);
			tmpView->EndLineArray();
			tmpView->SetPenSize(1.5);
			tmpView->SetHighColor(red);
			tmpView->StrokeArc(BPoint(15,7),4,2,180,180);
			tmpView->StrokeArc(BPoint(15,23),4,2,0,180);
   			off = tmpView->EndPicture();
   			//get rid of tmpView

		RemoveChild(tmpView);
		delete tmpView;
		depent = new BPictureButton(rect,"concate", on, off, NULL,B_TWO_STATE_BUTTON,B_FOLLOW_BOTTOM|B_FOLLOW_RIGHT);
		
		newPictureSizeView->AddChild(outputHeight);
		newPictureSizeView->AddChild(outputWidth);
		newPictureSizeView->AddChild(depent);
		newPictureSizeView->AddChild(messureKind);
		backView->AddChild(newPictureSizeView);
		
//		BButton	*testButton=new BButton(BRect(10,Bounds().Height()-45,70,Bounds().Height()-25),"TestButton","Test",new BMessage(TEST_REQUEST),B_FOLLOW_BOTTOM);
		BButton	*testButton=new BButton(BRect(Bounds().Width()-60,Bounds().Height()-45,Bounds().Width()-7,Bounds().Height()-25),"TestButton","Berechnen",new BMessage(TEST_REQUEST),B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM);
//		BButton	*speichernButton=new BButton(BRect(Bounds().Width()-70,Bounds().Height()-45,Bounds().Width()-10,Bounds().Height()-25),"SaveButton","Save",new BMessage(TEST_REQUEST),B_FOLLOW_RIGHT|B_FOLLOW_BOTTOM);
		backView->AddChild(testButton);
//		backView->AddChild(speichernButton);
		
		//---Neue Größe View---

	pluginWindow=NULL;
	

	LoadPlugins();

}
开发者ID:Paradoxianer,项目名称:ImmersiveVideo,代码行数:101,代码来源:ImmersiveVideoWindow.cpp


注:本文中的BView::SetPenSize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。