Search Results

Search found 93 results on 4 pages for 'thickness'.

Page 1/4 | 1 2 3 4  | Next Page >

  • WPF Border Thickness increase direction

    - by morsanu
    Hey. Another WPF question. In my XAML code I have a border: <Border x:Name="myBorder" Background="AliceBlue" Width="200" Height="200" BorderThickness="10" BorderBrush="Black"> </Border> and somewhere in code I increase the BorderThickness double thickness = myBorder.BorderThickness.Bottom + 2; myBorder.BorderThickness = new Thickness(thickness); and the result is that the border's weight increases but not outside the 200x200 width-height, but inner, decreasing the dimension. Is there a way to do the opposite?

    Read the article

  • Keeping the meshes "thickness" the same when scaling an object

    - by user1806687
    I've been bashing my head for the past couple of weeks trying to find a way to help me accomplish, on first look very easy task. So, I got this one object currently made out of 5 cuboids (2 sides, 1 top, 1 bottom, 1 back), this is just for an example, later on there will be whole range of different set ups. Now, the thing is when the user chooses to scale the whole object this is what should happen: X scale: top and bottom cuboids should get scaled by a scale factor, sides should get moved so they are positioned just like they were before(in this case at both ends of top and bottom cuboids), back should get scaled so it fits like before(if I simply scale it by a scale factor it will leave gaps on each side). Y scale: sides should get scaled by a scale factor, top and bottom cuboid should get moved, and back should also get scaled. Z scale: sides, top and bottom cuboids should get scaled, back should get moved. Hope you can help, EDIT: So, I've decided to explain the situation once more, this time more detailed(hopefully). I've also made some pictures of how the scaling should look like, where is the problem and the wrong way of scaling. I this example I will be using a thick walled box, with one face missing, where each wall is made by a cuboid(but later on there will be diffrent shapes of objects, where a one of the face might be roundish, or triangle or even under some angle), scaling will be 2x on X axis. 1.This is how the default object without any scaling applied looks like: http://img856.imageshack.us/img856/4293/defaulttz.png 2.If I scale the whole object(all of the meshes) by some scale factor, the problem becomes that the "thickness" of the object walls also change(which I do not want): http://img822.imageshack.us/img822/9073/wrongwaytoscale.png 3.This is how the correct scaling should look like. Appropriate faces gets caled in this case where the scale is on X axis(top, bottom, back): http://imageshack.us/photo/my-images/163/rightwayxscale1.png/ 4.But the scale factor might not be the same for all object all of the times. In this case the back has to get scaled a bit more or it leaves gaps: http://imageshack.us/photo/my-images/9/problemwhenscaling.png/ 5.If everything goes well this is how the final object should look like: http://imageshack.us/photo/my-images/856/rightwayxscale2.png/ So, as you have might noticed there are quite a bit of things to look out when scaling. I am asking you, if any of you have any idea on how to accomplish this scaling. I have tried whole bunch of things, from scaling all of the object by the same scale factor, to subtracting and adding sizes to get the right size. But nothing I tried worked, if one mesh got scaled correctly then others didnt. Donwload the example object. English is not my first language, so I am really sorry if its hard to understand what I am saying.

    Read the article

  • SolidColorBrush thickness property

    - by developer
    Hi All, Is it possible to set thickness property of SolidColorBrush. The reason I am asking is that I have a IValueConverter binding to Textbox Border BorderBrush property and I am dynamically setting the color of the textbox using the below code, SolidColorBrush tbbrush = new SolidColorBrush(Colors.DarkGray); return tbbrush; I also want to change the thickness property of the border, but without writing a new IValueConverter. Is it possible?

    Read the article

  • underline line thickness always one pixel...

    - by Mark
    ...regardless of font size. Its an mx:Text object. (The Text object is actually being used as a mask so don't know if that's the problem.) If underline is set with the <u> tag in Text.htmlText, or Text.textField.setTextFormat, the underline thickness is always just one pixel which is not acceptable. (There are other problems with <u> so I'm limited to using setTextFormat currently.) Can the thickness of an underline be set through CSS? (textField.styleSheet, etc.) I may have another problem as I already use setTextFormat extensively, and the documentation says you can't use textField.setTextFormat if you use textField.setStyleSheet. I primarily need the underline to simulate correctly the look for an anchor tag.

    Read the article

  • How to change line thickness in iText?

    - by drasto
    I'm drawing images to pdf using Java framework iText. I need to draw lines of specified width. There is a method setLineWidth(float width) in class PdfContentByte that should change it. However no matter what value I pass as its parameter the lines drawn are always extra thin. There is following line in javadoc of setLineWidth: The line width specifies the thickness of the line used to stroke a path and is measured in user space units. I don't know what is "space unit". Everything else in iText seems to be measured in point(around 1/72 inch). I cant find any reference to what are those "space units" and how to change them. code: to.setLineWidth(thickness); to.moveTo(x, y); to.lineTo(x + 100, y + 100); Variable to contains instance of PdfContentByte.

    Read the article

  • Math problem: Determine the corner radius of an inner border based on outer corner radius/thickness

    - by chaiguy
    Here's a math/geometry problem for the math whizzes (not my strongest subject). This is for WPF, but should be general enough to solve regardless: I have two embedded Border elements, with the outer one having a certain corner radius, R and border thickness, T. Given these two values, what should the corner radius of the inner Border, R' be set to such that the two corner edges meet with no overlap or holes? So far I've just been eyeballing it, but if someone can give me a proper formula that would be great. Respect points if you can!! ;)

    Read the article

  • How to change line thickness in iText? (iText is Java pdf framework)

    - by drasto
    I'm drawing images to pdf using Java framework iText. I need to draw lines of specified width. There is a method setLineWidth(float width) in class PdfContentByte that should change it. However no matter what value I pass as its parameter the lines drawn are always extra thin. There is following line in javadoc of setLineWidth: The line width specifies the thickness of the line used to stroke a path and is measured in user space units. I don't know what is "space unit". Everything else in iText seems to be measured in point(around 1/72 inch). I cant find any reference to what are those "space units" and how to change them. code: to.setLineWidth(thickness); to.moveTo(x, y); to.lineTo(x + 100, y + 100);

    Read the article

  • Generate a polygon from line.

    - by VOX
    I want to draw a line with thickness in j2me. This can easily be achieved in desktop java by setting Pen width as thickness value. However in j2me, Pen class does not support width. My idea is to generate a polygon from the line I have, that resembles the line with thickness i want to draw. In picture, on the left is what I have, a line with points. On the right is what I want, a polygon that when filled, a line with thickness. Could anyone know how to generate a polygon from line? http://www.freeimagehosting.net/uploads/140e43c2d2.gif

    Read the article

  • WPF: Draw a grid on a Canvas?

    - by stefan.at.wpf
    Hello community, I'm currently trying to add gridlines to a canvas. I need an exact free space between them, where I'd like to place something for hit detection per cell, maybe simply a transparent border or such a thing. While I thought this would be an easy thing, I'm facing problems like antialiasing and that lines in WPF aren't very "calculate" / exact drawing friendly - e.g. if I draw a line on x=20 with a thickness of 10, the line's width goes from x=15 to x=25 (maybe not exactly, just some kind like that), so it takes the given position as middle point - if it would draw from 20 to 30 it would be easier in my case. Besides that making things more complex, how does WPF handle e.g. a thickness of 5? Draw thickness 3 left from the given point and the remaining 2 right from it? Or maybe just the opposite way? Well, just wanted to show you which problems I have, though this all maybe just seems simple to be done. Just wondering if anyone has ever done this before. Currently I find a Border without content and just 2 sites set to a thickness greater than 0 as line seems to work the best in my tests, seems like it's clear where they are drawn and they somehow don't seem to make any antialiasing problems. Just wondering if there's a more intuitive / better way of doing this? I don't want to lay a Canvas over a Grid, I think this maybe makes some things more complex in the end (by the way: how would I place a Canvas on top of a Grid?). Thanks for any hint!

    Read the article

  • Translate ImageButton from C# to XAML

    - by Bill
    I worked out the C# code to create an ImageButton (below) that has three images (one base-image and two overlays) and three text boxes as the face of the button. I am inheriting from the Button class, which unfortunately includes several components that I didn't realize would surface until after coding and need to remove, namely the bright-blue surrounding border on IsMouseOver, and any visible borders between the buttons, as the buttons will end up in a wrapPanel and the borders need to be seamless. Now that the format has been worked out in C#, I expect that I need to translate to XAML so that I can create a ControlTemplate to get the functionality necessary, however I am not certain as to the process of translating from C# to XAML. Can anyone steer me in the right direction? public class ACover : Button { Image cAImage = null; Image jCImage = null; Image jCImageOverlay = null; TextBlock ATextBlock = null; TextBlock AbTextBlock = null; TextBlock ReleaseDateTextBlock = null; private string _TracksXML = ""; public ACover() { Grid cArtGrid = new Grid(); cArtGrid.Background = new SolidColorBrush(Color.FromRgb(38, 44, 64)); cArtGrid.Margin = new System.Windows.Thickness(5, 10, 5, 10); RowDefinition row1 = new RowDefinition(); row1.Height = new GridLength(225); RowDefinition row2 = new RowDefinition(); row2.Height = new GridLength(0, GridUnitType.Auto); RowDefinition row3 = new RowDefinition(); row3.Height = new GridLength(0, GridUnitType.Auto); RowDefinition row4 = new RowDefinition(); row4.Height = new GridLength(0, GridUnitType.Auto); cArtGrid.RowDefinitions.Add(row1); cArtGrid.RowDefinitions.Add(row2); cArtGrid.RowDefinitions.Add(row3); cArtGrid.RowDefinitions.Add(row4); ColumnDefinition col1 = new ColumnDefinition(); col1.Width = new GridLength(0, GridUnitType.Auto); cArtGrid.ColumnDefinitions.Add(col1); jCImage = new Image(); jCImage.Height = 240; jCImage.Width = 260; jCImage.VerticalAlignment = VerticalAlignment.Top; jCImage.Source = new BitmapImage(new Uri(Properties.Settings.Default.pathToGridImages + "jc.png", UriKind.Absolute)); cArtGrid.Children.Add(jCImage); cArtImage = new Image(); cArtImage.Height = 192; cArtImage.Width = 192; cArtImage.Margin = new System.Windows.Thickness(3, 7, 0, 0); cArtImage.VerticalAlignment = VerticalAlignment.Top; cArtGrid.Children.Add(cArtImage); jCImageOverlay = new Image(); jCImageOverlay.Height = 192; jCImageOverlay.Width = 192; jCImageOverlay.Margin = new System.Windows.Thickness(3, 7, 0, 0); jCImageOverlay.VerticalAlignment = VerticalAlignment.Top; jCImageOverlay.Source = new BitmapImage(new Uri( Properties.Settings.Default.pathToGridImages + "jc-overlay.png", UriKind.Absolute)); coverArtGrid.Children.Add(jCImageOverlay); ATextBlock = new TextBlock(); ATextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); ATextBlock.Margin = new Thickness(10, -10, 0, 0); cArtGrid.Children.Add(ATextBlock); AlTextBlock = new TextBlock(); AlTextBlock.Margin = new Thickness(10, 0, 0, 0); AlTextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); cArtGrid.Children.Add(AlTextBlock); RDTextBlock = new TextBlock(); RDTextBlock.Margin = new Thickness(10, 0, 0, 0); RDTextBlock.Foreground = new SolidColorBrush(Color.FromRgb(173, 176, 198)); cArtGrid.Children.Add(RDTextBlock); Grid.SetColumn(jCImage, 0); Grid.SetRow(jCImage, 0); Grid.SetColumn(jCImageOverlay, 0); Grid.SetRow(jCImageOverlay, 0); Grid.SetColumn(cArtImage, 0); Grid.SetRow(cArtImage, 0); Grid.SetColumn(ATextBlock, 0); Grid.SetRow(ATextBlock, 1); Grid.SetColumn(AlTextBlock, 0); Grid.SetRow(AlTextBlock, 2); Grid.SetColumn(RDTextBlock, 0); Grid.SetRow(RDTextBlock, 3); this.Content = cArtGrid; } public string A { get { if (ATextBlock != null) return ATextBlock.Text; else return String.Empty; } set { if (ATextBlock != null) ATextBlock.Text = value; } } public string Al { get { if (AlTextBlock != null) return AlTextBlock.Text; else return String.Empty; } set { if (AlTextBlock != null) AlTextBlock.Text = value; } } public string RD { get { if (RDTextBlock != null) return RDTextBlock.Text; else return String.Empty; } set { if (RDTextBlock != null) RDTextBlock.Text = value; } } public ImageSource Image { get { if (cArtImage != null) return cArtImage.Source; else return null; } set { if (cArtImage != null) cArtImage.Source = value; } } public string TracksXML { get { return _TracksXML; } set { _TracksXML = value; } } public double ImageWidth { get { if (cArtImage != null) return cArtImage.Width; else return double.NaN; } set { if (cArtImage != null) cArtImage.Width = value; } } public double ImageHeight { get { if (cArtImage != null) return cArtImage.Height; else return double.NaN; } set { if (cArtImage != null) cArtImage.Height = value; } } }

    Read the article

  • Algorithm for dragging objects on a fixed grid

    - by FlyingStreudel
    Hello, I am working on a program for the mapping and playing of the popular tabletop game D&D :D Right now I am working on getting the basic functionality like dragging UI elements around, snapping to the grid and checking for collisions. Right now every object when released from the mouse immediately snaps to the nearest grid point. This causes an issue when something like a player object snaps to a grid point that has a wall -or other- adjacent. So essentially when the player is dropped they wind up with some of the wall covering them. This is fine and working as intended, however the problem is that now my collision detection is tripped whenever you try to move this player because its sitting underneath a wall and because of this you cant drag the player anymore. Here is the relevant code: void UIObj_MouseMove(object sender, MouseEventArgs e) { blocked = false; if (dragging) { foreach (UIElement o in ((Floor)Parent).Children) { if (o.GetType() != GetType() && o.GetType().BaseType == typeof(UIObj) && Math.Sqrt(Math.Pow(((UIObj)o).cX - cX, 2) + Math.Pow(((UIObj)o).cY - cY, 2)) < Math.Max(r.Height + ((UIObj)o).r.Height, r.Width + ((UIObj)o).r.Width)) { double Y = e.GetPosition((Floor)Parent).Y; double X = e.GetPosition((Floor)Parent).X; Geometry newRect = new RectangleGeometry(new Rect(Margin.Left + (X - prevX), Margin.Top + (Y - prevY), Margin.Right + (X - prevX), Margin.Bottom + (Y - prevY))); GeometryHitTestParameters ghtp = new GeometryHitTestParameters(newRect); VisualTreeHelper.HitTest(o, null, new HitTestResultCallback(MyHitTestResultCallback), ghtp); } } if (!blocked) { Margin = new Thickness(Margin.Left + (e.GetPosition((Floor)Parent).X - prevX), Margin.Top + (e.GetPosition((Floor)Parent).Y - prevY), Margin.Right + (e.GetPosition((Floor)Parent).X - prevX), Margin.Bottom + (e.GetPosition((Floor)Parent).Y - prevY)); InvalidateVisual(); } prevX = e.GetPosition((Floor)Parent).X; prevY = e.GetPosition((Floor)Parent).Y; cX = Margin.Left + r.Width / 2; cY = Margin.Top + r.Height / 2; } } internal virtual void SnapToGrid() { double xPos = Margin.Left; double yPos = Margin.Top; double xMarg = xPos % ((Floor)Parent).cellDim; double yMarg = yPos % ((Floor)Parent).cellDim; if (xMarg < ((Floor)Parent).cellDim / 2) { if (yMarg < ((Floor)Parent).cellDim / 2) { Margin = new Thickness(xPos - xMarg, yPos - yMarg, xPos - xMarg + r.Width, yPos - yMarg + r.Height); } else { Margin = new Thickness(xPos - xMarg, yPos - yMarg + ((Floor)Parent).cellDim, xPos - xMarg + r.Width, yPos - yMarg + ((Floor)Parent).cellDim + r.Height); } } else { if (yMarg < ((Floor)Parent).cellDim / 2) { Margin = new Thickness(xPos - xMarg + ((Floor)Parent).cellDim, yPos - yMarg, xPos - xMarg + ((Floor)Parent).cellDim + r.Width, yPos - yMarg + r.Height); } else { Margin = new Thickness(xPos - xMarg + ((Floor)Parent).cellDim, yPos - yMarg + ((Floor)Parent).cellDim, xPos - xMarg + ((Floor)Parent).cellDim + r.Width, yPos - yMarg + ((Floor)Parent).cellDim + r.Height); } } } Essentially I am looking for a simple way to modify the existing code to allow the movement of a UI element that has another one sitting on top of it. Thanks!

    Read the article

  • How to bind to the sum of two data bound values in WPF?

    - by Sheridan
    I have designed an analog clock control. It uses the stroke from two ellipses to represent an outer border and an inner border to the clock face. I have exposed properties in the UserControl that allow a user to alter the thickness of these two borders. The Ellipse.StrokeThickness properties are then bound to these UserControl properties. At the moment, I am binding the UserControl property for the outer border thickness to the margins of the inner elements so that they are not hidden when the border size is increased. <Ellipse Name="OuterBorder" Panel.ZIndex="1" StrokeThickness="{Binding OuterBorderThickness, ElementName=This}" Stroke="{StaticResource OuterBorderBrush}" /> <Ellipse Name="InnerBorder" Panel.ZIndex="5" StrokeThickness="{Binding InnerBorderThickness, ElementName=This}" Margin="{Binding OuterBorderThickness, ElementName=This}" Stroke="{StaticResource InnerBorderBrush}"> ... <Ellipse Name="Face" Panel.ZIndex="1" Margin="{Binding OuterBorderThickness, ElementName=This}" Fill="{StaticResource FaceBackgroundBrush}" /> ... The problem is that if the inner border thickness is increased, this does not affect the margins and so the hour ticks and numbers can become partially obscured or hidden. So what I really need is to be able to bind the margin properties of the inner controls to the sum of the inner and outer border thickness values (they are of type double). I have done this successfully using 'DataContext = this;', but am trying to rewrite the control without this as I hear it is not recommended. I also thought about using a converter and passing the second value as the ConverterParameter, but didn't know how to bind to the ConverterParameter. Any tips would be greatly appreciated. EDIT Thanks to Kent's suggestion, I've created a simple MultiConverter to add the input values and return the result. I've hooked the SAME multibinding with converter XAML to both a TextBlock.Text property and the TextBlock.Margin property to test it. <TextBlock> <TextBlock.Text> <MultiBinding Converter="{StaticResource SumConverter}" ConverterParameter="Add"> <Binding Path="OuterBorderThickness" ElementName="This" /> <Binding Path="InnerBorderThickness" ElementName="This" /> </MultiBinding> </TextBlock.Text> <TextBlock.Margin> <MultiBinding Converter="{StaticResource SumConverter}" ConverterParameter="Add"> <Binding Path="OuterBorderThickness" ElementName="This" /> <Binding Path="InnerBorderThickness" ElementName="This" /> </MultiBinding> </TextBlock.Margin> </TextBlock> I can see the correct value displayed in the TexBlock, but the Margin is not set. Any ideas? EDIT Interestingly, the Margin property can be bound to a data property of type double, but this does not seem to apply within a MultiBinding. As advised by Kent, I changed the Converter to return the value as a Thickness object and now it works. Thanks Kent.

    Read the article

  • Bad font anti-aliasing in Ubuntu

    - by Juliano
    I'm switching from Fedora 8 to Ubuntu 9.04, and I can't seem to get it to get a good font anti-aliasing to work. It seems that Ubuntu's fontconfig tries to keep characters in integral pixel widths. This makes text more difficult to read, when 1 pixel is too thin and 2 pixels is too thick. Check the image below. In Fedora, when fontconfig anti-aliasing is enabled, fonts have their thickness proportional to the font size. Below, the thickness is different for 8, 9 and 10pt sizes. In Ubuntu, on the other hand, even when anti-aliasing is enabled, all 8, 9 and 10pt sizes have 1 pixel thickness. This makes reading larges amount of text difficult. I'm using the very same home directory, and I already checked that X resources are the same in both systems: ~% xrdb -query | grep Xft Xft.antialias: 1 Xft.dpi: 96 Xft.hinting: 1 Xft.hintstyle: hintfull Xft.rgba: none GNOME settings: ~% gconftool-2 -a /desktop/gnome/font_rendering antialiasing = grayscale hinting = full dpi = 96 rgba_order = rgb So, the question is: What should I change in the new box (Ubuntu) in order to get anti-aliasing like in the old box (Fedora)?

    Read the article

  • AS3 change lineStyle of existing line

    - by Ozzy
    Hi all im drawing a line from 0,0 to 100,100 im using this to modify the linestyle: draw_line.graphics.lineStyle(1, 0xFF0000); That line is now of 1 thickness. Is there anyway i can change the thickness of the line to say 10, but without redrawing the line?

    Read the article

  • How to hide the border around child window

    - by Subhen
    Hi, I have a child Window , and I am displaying it from the code behind as below: ChildPhotoViewer PhotoViewer = new ChildPhotoViewer(); PhotoViewer.DataContext = selectedPhoto; PhotoViewer.Title = selectedPhoto.strTitle.ToString(); PhotoViewer.Show(); But While Displaying the child window I am getting the Close Button and a Border thickness arround the Window. I am able to hide the Close Button but is there a way to hide the thickness(Border) across the child window. Thanks, Subhen

    Read the article

  • inline and member initializers

    - by Alexander
    When should I inline a member function and when should I use member initializers? My code is below.. I would like to modify it so I could make use some inline when appropriate and member initializers: #include "Books.h" Book::Book(){ nm = (char*)""; thck = 0; wght = 0; } Book::Book(const char *name, int thickness, int weight){ nm = strdup(name); thck = thickness; wght = weight; } Book::~Book(){ } const char* Book::name(){ return nm; } int Book::thickness(){ return thck; } int Book::weight(){ return wght; } // // Prints information about the book using this format: // "%s (%d mm, %d dg)\n" // void Book::print(){ printf("%s (%d mm, %d dg)\n", nm, thck, wght); } Bookcase::Bookcase(int id){ my_id = id; no_shelf = 0; } int Bookcase::id(){ return my_id; } Bookcase::~Bookcase(){ for (int i = 0; i < no_shelf; i++) delete my_shelf[i]; } bool Bookcase::addShelf(int width, int capacity){ if(no_shelf == 10) return false; else{ my_shelf[no_shelf] = new Shelf(width, capacity); no_shelf++; return true; } } bool Bookcase::add(Book *bp){ int index = -1; int temp_space = -1; for (int i = 0; i < no_shelf; i++){ if (bp->weight() + my_shelf[i]->curCapacity() <= my_shelf[i]->capacity()){ if (bp->thickness() + my_shelf[i]->curWidth() <= my_shelf[i]->width() && temp_space < (my_shelf[i]->width() - my_shelf[i]->curWidth())){ temp_space = (my_shelf[i]->width()- my_shelf[i]->curWidth()); index = i; } } } if (index != -1){ my_shelf[index]->add(bp); return true; }else return false; } void Bookcase::print(){ printf("Bookcase #%d\n", my_id); for (int i = 0; i < no_shelf; i++){ printf("--- Shelf (%d mm, %d dg) ---\n", my_shelf[i]->width(), my_shelf[i]->capacity()); my_shelf[i]->print(); } }

    Read the article

  • Flash CS5 screwed up all my textfields - how can I correct this?

    - by WillyCornbread
    Hi - I have an Actionscript project that I was building using Flash CS4. I embedded a font using the follow: [Embed(source="/bin/assets/fonts/MyriadPro-Regular.otf", fontWeight="normal", fontFamily="Myriad Pro")] Then throughout my application in my TextFields I would set embedFonts to true antialiastype to advanced and set the thickness property of the text field. And setting the font-family from a stylesheet. This was all working exactly as I expected it would with no issues whatsoever and months of development. I just upgraded to CS5 and published and none of my text is rendered at all. I was able to resolve this by removing the embedFonts = true from the textfields, but this leaves me with no control over the thickness at all. I searched everywhere, does anyone know what the proper way to do this in CS5 is now? I've tried embedding my font directly within the CS5 IDE but still no thickness control. Thanks in advance for any help - I've got tons of textfields throughout my app that are all ganked right now. Thanks Adobe. b

    Read the article

  • Stored Procedure: Reducing Table Data

    - by SumGuy
    Hi Guys, A simple question about Stored Procedures. I have one stored procedure collecting a whole bunch of data in a table. I then call this procedure from within another stored procedure. I can copy the data into a new table created in the calling procedure but as far as I can see the tables have to be identical. Is this right? Or is there a way to insert only the data I want? For example.... I have one procedure which returns this: SELECT @batch as Batch, @Count as Qty, pd.Location, cast(pd.GL as decimal(10,3)) as [Length], cast(pd.GW as decimal(10,3)) as Width, cast(pd.GT as decimal(10,3)) as Thickness FROM propertydata pd GROUP BY pd.Location, pd.GL, pd.GW, pd.GT I then call this procedure but only want the following data: DECLARE @BatchTable TABLE ( Batch varchar(50), [Length] decimal(10,3), Width decimal(10,3), Thickness decimal(10,3), ) INSERT @BatchTable (Batch, [Length], Width, Thickness) EXEC dbo.batch_drawings_NEW @batch So in the second command I don't want the Qty and Location values. However the code above keeps returning the error: "Insert Error: Column name or number of supplied values does not match table"

    Read the article

  • Toon/cel shading with variable line width?

    - by Nick Wiggill
    I see a few broad approaches out there to doing cel shading: Duplication & enlargement of model with flipped normals (not an option for me) Sobel filter / fragment shader approaches to edge detection Stencil buffer approaches to edge detection Geometry (or vertex) shader approaches that calculate face and edge normals Am I correct in assuming the geometry-centric approach gives the greatest amount of control over lighting and line thickness, as well eg. for terrain where you might see the silhouette line of a hill merging gradually into a plain? What if I didn't need pixel lighting on my terrain surfaces? (And I probably won't as I plan to use cell-based vertex- or texturemap-based lighting/shadowing.) Would I then be better off sticking with the geometry-type approach, or go for a screen space / fragment approach instead to keep things simpler? If so, how would I get the "inking" of hills within the mesh silhouette, rather than only the outline of the entire mesh (with no "ink" details inside that outline? Lastly, is it possible to cheaply emulate the flipped-normals approach, using a geometry shader? Is that exactly what the GS approaches do? What I want - varying line thickness with intrusive lines inside the silhouette... What I don't want...

    Read the article

1 2 3 4  | Next Page >